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 / vinay tiwari

//string is a refference type but it behavious like a value
//type.
//following programe show both charactersitic of string.
using System;
class a
{
public static void Main(String [] args)
{
String str1="hello";
String str2=str1;
String str3="hello";
Console.WriteLine(str1);
Console.WriteLine(str2);
if(str1==str3)
{
Console.WriteLine("str1 anb str3 are
equal ");
}
}
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is array a list?

886


How many types of collections are there in c#?

896


What are the differences between system.string and system.text.stringbuilder classes?

1007


What is use of FormBoarderStyle Propertie

937


Can we write class inside a class in c#?

975


What is mvc firstordefault?

919


How does the clr work?

921


What is Assembly. and Describe type of assembly. why most developer happy with private assembly.

977


What is int64 in c#?

900


What is tuple in c#?

916


Can we call server-side code (c# or vb.net code) from javascript?

953


Can abstract class have private constructor c#?

953


What's new in c#?

910


How do I create a single-file assembly?

1030


Explain about multithreading?

1036