Hello all,
I am working on a project containing parts of C#, managed C++ as well as unmanaged C++ code. I am working with .NET 3.5.
My programming experience lies more on the unmanaged C++ side an I am not that familiar with the concepts of .NET.
My question is: How can I hide / provide a delegate behind a managed interface class.
Suppose my interface looks sth. like this...
// I guess this is a type definition so it has to be placed outside of the interface
delegate void SignalStrengthDelegate(short input);
public interface class Test
{
event SignalStrengthDelegate^ signalStrengthChanged;
void doSomething();
};
... then I get an compiler-error in the ref class implementing this interface. The error suggests that i should implement methods for adding an removing the delegates. After trying to do this the compiler asks me to switch to /clr:oldSyntax... so that's also not what I am looking for.
I googled around a lot but can't find any suggestions for my problem... at some point I have the feeling that delegates and interfaces are some kind of contrary concepts and should not be mixed.
Any suggestions?
TIA!