Is string a value type or a reference type?

Answer Posted / senthilselvan

string is a reference type.

string str = "hello";
char x = str[1];

here what we do is handling the memory.
which type allows you to handle the memory is reference types.

Is This Answer Correct ?    26 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?

2266


What is a reflection?

577


Elaborate differentiation between ViewState and SessionState?

607


How to implement form based authentication in asp.net application?

561


Explain why it is useful to use mvc instead of webforms? : asp.net mvc

590






What is a multilingual website?

557


What is session and cookies in asp.net?

548


Differentiate between a page theme and a global theme?

519


To display data in a Repeater control which template you provide?

584


What is the difference between union and structure?

498


Explain the disadvantages of viewstate?

567


List the advantages and disadvantages of user control an custom control?

529


Explain what is clr?

620


Explain how cookies work. Give an example of cookie abuse.

713


What are sql notifications and sql invalidations?

525