## Predicate typedef


يمثل مؤشرًا إلى دالة شرطية - كيان قابل للاستدعاء يقبل وسيطًا واحدًا ويعيد قيمة منطقية.

```cpp
using System::Predicate =  MulticastDelegate<bool(T)>
```

## ملاحظات



```cpp
#include "system/array.h"
#include "system/predicate.h"
#include <iostream>

int main()
{
  // املأ المصفوفة.
  auto arr = System::MakeArray<int>({-1, -123, 5, 3, 7});

  // أنشئ المتنبئ الذي يُعيد عنصرًا من المصفوفة أكبر من 3.
  const auto predicate = static_cast<System::Predicate<int>>([](int a) -> bool
  {
      return a > 3;
  });

  // اعثر على العنصر الأول في المصفوفة باستخدام المتنبئ المُنشأ واطبعه.
  int firstItem = System::Array<int>::Find(arr, predicate);
  std::cout << firstItem << std::endl;

  return 0;
}
/*
This code example produces the following output:
5
*/
```

## انظر أيضًا

* Namespace [System](../)
* Library [Aspose.Page for C++](../../)
