I want to use Action and Func delegate generics from .Net for a C++/CX Windows Store App. Are they part of WinRT, too?
delegate void f( int );
ref class Sample
{
...
event f^ Rendered; // this works
event Action<int>^ Rendered; // ??? I want something like this using existing lib without creating templates on my own (which Namespace/Header) ???
...
}
There is no such thing as “C++/CLI for Window Store apps”. Only C# and VB.NET got the Store treatment and can take advantage of the WinRT language projection built into the CLR. It wouldn’t be entirely impossible to use that language projection in C++/CLI as well but you get no help whatsoever from the tooling.
You use a language called C++/CX. Which is not at all a .NET based language. It is very much native C++, compiled directly to machine code. It helps you use WinRT types with language syntax extensions that resemble C++/CLI a lot. Like the
ref classsyntax. But since it is not a .NET language it cannot take advantage of .NET classes.A basic introduction to the language is here.