System::Action typedef
Action typedef
Geri dönüş değeri olmayan yöntemlere referans veren delege türü.
using System::Action = MulticastDelegate<void(Args...)>
Açıklamalar
#include <system/action.h>
using namespace System;
// Geçilen dizgiyi yazdıran fonksiyon.
void PrintString(const String &string)
{
using namespace std;
cout << string << endl;
}
int main()
{
// Action'ın bir örneğini oluştur.
auto action = Action<String>(std::bind(&PrintString, std::placeholders::_1));
// Action'ı çağır.
action(u"Hello, world!");
return 0;
}
/*
This code example produces the following output:
Hello, world!
*/
Ayrıca Bakınız
- Namespace System
- Library Aspose.Page for C++