Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is string reference type / value type?

Answer Posted / n

Hi Guys

If any of you got so far.. Here is the deal:

The differnce between value types and reference types are
whether the information is stored in the stack or on the
heap. Design guidelines for designing structures (value
type, stored in the stack) is that it's instance value
should be less than 16 bytes.

In the .NET Framework, ALL value types are 16 bytes or
shorter.

A string can be a lot more than 16 bytes...

It does however act like a value type in order to make the
programming easier for us... This can be the reason for all
this confusion...

Now stop arguing and start converting coffee into code....

/N

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is disconnected data architecture in c#?

933


How do you set a class path?

824


Why can't we use a static class instead of singleton?

822


Why singleton class is sealed?

878


Are c# strings immutable?

837


How to sort an int array in c#?

894


What is field in c#?

862


Why do we use struct in c#?

911


Can we override constructor in c#?

875


What is platform independence"?

892


What's different between c# and c/c++?

887


Why generics are used?

848


When do we generally use destructors to release resources?

873


Can an array be null c#?

894


What the different phase/steps of acquiring a proxy object in webservice?

919