Export (0) Print
Expand All
Expand Minimize

Compiler Error C3819

Error Message

wrong number of parameters in 'property'

An accessor function for a __property had the wrong number of parameters.

C3819 is only reachable using /clr:oldSyntax.

The following sample generates C3819:

// C3819.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
using namespace System;

__gc struct AtClass {
   __property int get_bad() {
      return _i;
   }

   __property void set_bad() {   // C3819
   }

   // uncomment this access definition to resolve
   /*
   __property void set_bad(int i) {
      _i = i;
   }
   */
public:
   int _i;
};

int main() {
}

Community Additions

ADD
Show:
© 2014 Microsoft