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 a value type or a reference type?

Answer Posted / sheetal shivdas

run this code : to see that string is reference type


SByte a = 0;
Byte be = 0;
Int16 c = 0;
Int32 d = 0;
Int64 ee = 0;
String s = "";
Exception ex = new Exception();

object[] Types = { a, be, c, d, ee, s,ex };

foreach (object obj in Types)
{
string type;
if (obj.GetType().IsValueType)
type = "Value Type";
else
type = "Reference Type";
Response.Write(type);
}

Is This Answer Correct ?    32 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is session in web technology?

950


What is ispostback method in asp.net? Why do we use that?

1212


Can viewstate be accessed in another page?

1022


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

1192


What is query string with example?

957


What are the different session state management options available in asp.net?

983


Why session is more secure than cookies?

900


Name the tools or API for developing or testing web api?

945


i want to implement grid view value in paypal site. so how to create this code in asp.net with C#

1855


What are user controls?

998


Explain the difference between singleton and single call?

979


Explain the boxing and unboxing concept in .net?

854


How you can access the values from the Repeater control in ASP.NET?

1064


Define cookie.

968


What is the difference between a multi-layer and multi-tier applications?

1006