Implement Empty Field

  • Thread starter Thread starter Bumbala
  • Start date Start date
B

Bumbala

Hello,

How can I implement a field similar to "System::Drawing::Point::Empty"
in my own managed class? I can't figure out the syntax. MSDN documents
as "static initonly Point Empty".

Thanks.
 
Bumbala said:
Hello,

How can I implement a field similar to "System::Drawing::Point::Empty"
in my own managed class? I can't figure out the syntax. MSDN documents
as "static initonly Point Empty".

Thanks.

static members need to be defined outside the class definition, for both
managed and unmanaged classes (except static constants of integral type,
which can be initialized inside the class definition). That definition can
initialize the member, or you can use a static constructor.
 
Back
Top