System::Action टाइपडिफ

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!
*/

संबंधित देखें