return type of method 'get accessor' must match type of the last parameter of 'set accessor'
When declaring properties, the return value of the Get Accessor method must match the last parameter in the declaration of the Set Accessor method.
The following sample generates C3815:
#using <mscorlib.dll> __gc class X { public: __property int get_N( int i ) { Console::WriteLine( L"int" ); return m_val[i]; } __property void set_N( int i, char val ) { // C3815 // The following line resolves the error. // __property void set_N( int i, int val ) { m_val[i] = val; } private: int m_val[10]; }; void main() { }