Kompilatorfel C3902

"accessor": typen av sista parameter måste vara "typ"

Anmärkningar

Typen av den sista parametern för minst en uppsättningsmetod måste matcha egenskapens typ. Mer information finns under egenskapen.

Example

I följande exempel genereras C3902:

// C3902.cpp
// compile with: /clr /c
using namespace System;
ref class X {
   property String ^Name {
      void set(int);   // C3902
      // try the following line instead
      // void set(String^){}
   }

   property double values[int,int] {
      void set(int, int, float);   // C3902
      // try the following line instead
      // void set(int, int, double){}
   }
};