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.
In an interpolated string, if the N2 format specifier is use…
In an interpolated string, if the N2 format specifier is used on the number 5.378, the resulting value will be 5.37.
When reading the contents of a file into an array, your loop…
When reading the contents of a file into an array, your loop must always iterate until the array is full.
When using a numeric format specifier such as N, F, or C in…
When using a numeric format specifier such as N, F, or C in an interpolated string, it is possible to specify the number of digits to display after a decimal point.
In the following statement, the car variable is argument 1:…
In the following statement, the car variable is argument 1: string message = String.Format(“I own a blue {0}.”, car);
You can pass string literals as arguments to methods contain…
You can pass string literals as arguments to methods containing string parameters.