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 asp.net security controls?

789


Why is the standalone environment only useful during the development process?

1585


What is comparevalidator?

709


What is work flow gen? how can it will work with .Net?

2752


Where is session cookies stored?

701


What does asp in asp.net stand for?

724


What are the authentication types in asp.net?

771


What are the different method of navigation in asp.net?

737


How would you turn off cookies on a page of a website?

673


What is client side state management?

686


What is sdlc process?

730


What are ASHX files?

794


Why do we use datasource in asp.net?

700


Is react a template engine?

680


How can we pass info between 2 asp.net pages?

760