The class header defines a class’s fields, properties, and methods.
If you try to pass a property to a ref or an out parameter,…
If you try to pass a property to a ref or an out parameter, an error occurs.
To make a property read-only, omit the set accessor for the…
To make a property read-only, omit the set accessor for the property.
Objects that are instances of a class cannot be stored in an…
Objects that are instances of a class cannot be stored in an array.
In C#, you are not allowed to use an uninitialized class fie…
In C#, you are not allowed to use an uninitialized class field.
To make a property read-only, you must omit the get accessor…
To make a property read-only, you must omit the get accessor for the property.
A property is a class member that behaves like a public fiel…
A property is a class member that behaves like a public field.
Auto-properties cannot have a private set accessor.
Auto-properties cannot have a private set accessor.
If you call a method that has a reference parameter, you mus…
If you call a method that has a reference parameter, you must also write the keyword ref before the argument.
The name of a class’s constructor is the same as the name of…
The name of a class’s constructor is the same as the name of the class.