L
Lee Alexander
Because of a crappy bug (which I hoped would be fixed in 7.1) I have to use
an add / remove accessor for an event in a managed C++ class. The trouble
is that on the C# end it won't allow me to use += on the event.
"'CPPLib.SomeClass' does not contain a definition for 'SayHello'"
This is how I am declaring the events in my CPP class:
public:
static __event void add_SayHello(EventHandler * p)
{
Inner::SayHello += p;
}
static __event void remove_SayHello(EventHandler * p)
{
Inner::SayHello -= p;
}
static __event void raise_SayHello()
{
Inner::InvokeSayHello();
}
Any ideas would be welcome....
Regards
Lee.
an add / remove accessor for an event in a managed C++ class. The trouble
is that on the C# end it won't allow me to use += on the event.
"'CPPLib.SomeClass' does not contain a definition for 'SayHello'"
This is how I am declaring the events in my CPP class:
public:
static __event void add_SayHello(EventHandler * p)
{
Inner::SayHello += p;
}
static __event void remove_SayHello(EventHandler * p)
{
Inner::SayHello -= p;
}
static __event void raise_SayHello()
{
Inner::InvokeSayHello();
}
Any ideas would be welcome....
Regards
Lee.