'type' : 靜態 'operator =' 函式不合法
備註
指定 (=) 運算子未正確宣告為 static。 指定運算子不可以是 static。 如需詳細資訊,請參閱使用者定義運算元(C++/CLI)。
範例
下列範例會產生 C2581。
// C2581.cpp
// compile with: /clr /c
ref struct Y {
static Y ^ operator = (Y^ me, int i); // C2581
Y^ operator =(int i); // OK
};