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.Page for C++