Courtesy of Doug Harrison (fellow VC++ MVP):
#using
using namespace System;
public __delegate void Del();
__gc struct A
{
void f() {
Console::WriteLine(S"A::f()\nTypeIs: {0}", this->GetType());
}
};
__gc struct B
{
void f() {
Console::WriteLine(S"B::f()\nTypeIs: {0}", this->GetType());
}
};
int main()
{
Del* s = new Del(new B(), &A::f);
s();
}
Enjoy!
2 Comments
archived from WordPress — closedI posted about this problem to the MS NG about 3 or 4 month ago ;)
forget this .. I hit the wrong section