Is string reference type / value type ?

Answer Posted / ankur sehgal

string is reference type but it behaves as value
type.Because every time u assign a value to string a new
object is created.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between string and stringbuilder in c#?

459


Why do we need interfaces in c#?

484


What is literal control

583


Is post back in c#?

519


Why do you need boxing in c#?

488






Explain the top reason to use c# language?

499


What is the difference between ienumerable and enumerable?

450


What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?

601


How do I count the length of a string in c#?

498


What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?

523


Are objects passed by reference in c#?

520


What is executereader in c#?

474


What is the default modifier for class in c#?

513


What is the difference between private and protected in c#?

496


Why delegates are required?

535