how to use a pointer in c sharp code example
Example 1: function pointers in C#
delegate int Func1(string s);
delegate Func1 Func2(Func1 f);
delegate*<string, int>;
delegate*<delegate*<string, int>, delegate*<string, int>>;
delegate* managed<string, int>;
delegate*<delegate* managed<string, int>, delegate*<string, int>>;
Example 2: function pointers in C#
unsafe class Example {
void Conversions() {
delegate*<int, int, int> p1 = ...;
delegate* managed<int, int, int> p2 = ...;
delegate* unmanaged<int, int, int> p3 = ...;
p1 = p2;
Console.WriteLine(p2 == p1);
p2 = p3;
}
}