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 C3367

invalid argument for Delegate constructor

An argument passed to the delegate constructor was incorrect.

The following sample generates C3367:

#using <mscorlib.dll>

__delegate void D(int, int);

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

void main() {
   C *pC = new C;
   int i;

   System::Delegate *pD = new D(i);   // C3367

   // try the line below to resolve the error
   // System::Delegate *pD = new D(pC, &C::mf);
}