System::Action typedef
Action typedef
Dönüş değeri olmayan yöntemleri referans alan bir delege tipini temsil eder.
using System::Action = MulticastDelegate<void(Args...)>
Açıklamalar
#include <system/action.h>
using namespace System;
// Geçilen dizeyi yazdıran işlev.
void PrintString(const String &string)
{
using namespace std;
cout << string << endl;
}
int main()
{
// Action sınıfının bir örneğini oluştur.
auto action = Action<String>(std::bind(&PrintString, std::placeholders::_1));
// Eylemi ç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.Font for C++