Muistiinpano
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoja.
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoja.
'type' : static 'operator =' function is illegal
Remarks
The assignment (=) operator is incorrectly declared as static. Assignment operators cannot be static. For more information, see User-Defined Operators (C++/CLI).
Example
The following example generates C2581.
// C2581.cpp
// compile with: /clr /c
ref struct Y {
static Y ^ operator = (Y^ me, int i); // C2581
Y^ operator =(int i); // OK
};