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ú.
'member' : cannot be a member of interface 'interface'
Remarks
An interface class cannot contain a data member unless it is also a property.
Anything other than a property or member function is not allowed in an interface. Furthermore, constructors, destructors, and operators are not allowed.
Example
The following example generates C2844:
// C2844a.cpp
// compile with: /clr /c
public interface class IFace {
int i; // C2844
// try the following line instead
// property int Size;
};