Hi !
In C#, I can do (*):
Button b = new Button();
b.Click += ButtonOnClick;
:
void ButtonOnClick(object sender, RoutedEventArgs e)
{
// do something
}
But in C++/CLI I can't do:
Button ^ b = gcnew Button();
b->Click += ButtonOnClick;
:
void ButtonOnClick(Object ^ sender, RoutedEventArgs ^ e)
{
// do something
}
I get a compiler error complaing about the += ButtonOnClick: 2>.\blub.cpp(108) : error C3867: 'MyListBoxItem::ButtonOnClick': function call missing argument list; use '&MyListBoxItem::ButtonOnClick' to create a pointer to member
(The tip the compiler gives me doesn't work because it isn't a static method.)
What is the equivalent of (*) in C++/CLI ?
Thx Marc