NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C3354

'delegate' : the function used to create a multicast Delegate must have a 'void' return type

A multicast __delegate must return void.

The following sample generates C3354:

#using <mscorlib.dll>
__delegate(multicast) int D(int, int);   // C3354
// The following line resolves the error.
// __delegate(multicast) void D(int, int);

__gc class C {
public:
   void mf(int, int) {
   }
};

void main() {
C *pC = new C;
System::Delegate *pD = new D(pC, &C::mf);
}