System::Action typedef
Action typedef
نوع تفويض يشير إلى طرق لا تُعيد قيمة.
using System::Action = MulticastDelegate<void(Args...)>
ملاحظات
#include <system/action.h>
using namespace System;
// الدالة التي تطبع السلسلة المُمرَّرة.
void PrintString(const String &string)
{
using namespace std;
cout << string << endl;
}
int main()
{
// إنشاء نسخة من Action.
auto action = Action<String>(std::bind(&PrintString, std::placeholders::_1));
// استدعاء الإجراء.
action(u"Hello, world!");
return 0;
}
/*
This code example produces the following output:
Hello, world!
*/
انظر أيضًا
- Namespace System
- Library Aspose.Font for C++