Is string a value type or a reference type?

Answer Posted / micho

Strings are reference types, but they are special reference
types because they are made to behave like value-types.
For instance, after assigning a string to another, the two
strings remain independent. Likewise, you compare strings
with the = operator (because it is overloaded).

You can open the MSDN and see that strings are classes (ie,
reference-types).

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various ways to send content from one page to another?

525


What does passport and windows authentication mean in ASP.NET?

652


Explain the difference between response.redirect vs server.transfer

621


How do we implement bundling in MVC?

596


What is the difference between pathparam and queryparam?

582






What are the main advantages of using asp.net?

558


What is difference between web config and global asax?

445


How do I create a web form?

534


What is the caspol.exe tool used for?

545


Why does my asp.net file have multiple tag with runat=server?

579


How do active server pages work?

550


What are cookies in asp.net?

580


What is asp.net localization?

503


What does the .webpart file do?

591


What are the merits and demerits of viewstate?

582