Which of the following C# types is a reference type?
Correct answer C. string
string is an alias for System.String, a class, so it is a reference type even though it behaves like a value because it is immutable. int, bool and decimal are aliases for the structs System.Int32, System.Boolean and System.Decimal, which are value types. A variable of a value type holds the data itself, whereas a reference-type variable holds a reference to an object.
Answer checked How we write and check questions
Discussion