Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'type::operator operator': CLR/WinRT operator not valid. At least one parameter must be of the following types: 'T^', 'T^%', 'T^&', where T = 'type'
Remarks
An operator in a Windows Runtime or managed type did not have at least one parameter whose type is the same as the type of the operator return value.
Example
The following example generates C2394:
// C2394.cpp
// compile with: /clr /c
ref struct Y {
static Y^ operator -(int i, char c); // C2394
// OK
static Y^ operator -(Y^ hY, char c);
// or
static Y^ operator -(int i, Y^& rhY);
};