Megosztás a következőn keresztül:


C3901 fordítási hiba

"accessor_function": "típus" visszatérési típussal kell rendelkeznie

Megjegyzések

Legalább egy get metódus visszatérési típusának meg kell egyeznie a tulajdonságtípussal. További információ: tulajdonság.

Example

Az alábbi példa c3901-et hoz létre:

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

ref class Y {
   property double values[int, int] {
      int get(int, int);   // C3901
      // try the following line instead
      // double get(int, int);
   };
};