I was asked this question in an interview: Is string a reference type or a value type.
I said its a reference type. Then he asked me why don't we use new operator while initializing the string ? I said because the c# language has a simpler syntax for creating a string and the compiler automatically converts the code into a call for the construcor of the System.String class.
Is this answer correct or not ?
See Question&Answers more detail:os