Function Pointer Types
Posted by: IKVM.NET Weblog,
on 02 Dec 2011 |
View original | Bookmarked: 0 time(s)
In today's snapshot I also added support for function pointer types. The CLI supports
both managed and unmanaged function pointer types, however both are unverifiable.
Here's a small C++/CLI example of using a managed function pointer type (in the call
methodsignature):
void func() {
System::Console::WriteLine("Hello from Func");
}
void call(void (*p)()) {
p();
}
void main() {
call(func);
}
Compile this with...