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 preprocessor in .net?

934


What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC

915


What is meant by asp.net?

942


What is the difference between rest and restful?

1011


what are the ihttphandler and ihttphandlerfactory interfaces ?

913


What is cas?

1005


What are user controls?

958


What is http pipeline in asp.net?

941


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

918


How can we communicate with each server in N-tier Architecture? and what are the methods?

2200


What is the function of the ViewState property?

987


When should I use server transfer and response redirect?

944


What a diffgram is, and a good use for one?

951


What is application in asp net?

877


Which is better union or union all?

1020