John  Burns

John Burns

  • NA
  • 120
  • 109.1k

Can a property be so simple? is this correct?

Dec 21 2010 7:26 AM

im now learning how to use properties in C# Windows Form.
one thing that strikes me is there the below example is a property BUT there is no mention of the word property when declaring it?
is it really this simple? seems to simple to be true, i expected a bit more to properties as ive seen with other languages.
 
public string Name
    {
        get
        {
           return myName;
        }
        set
        {
           myName = value;
        }
    }


Answers (4)