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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top