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?

Answers were Sorted based on User's Feedback



Is string reference type / value type?..

Answer / frank

Habitat, you're an idiot and just confusing things further. This thread is littered with links pointing out that string is a reference type. Here's are two more: http://msdn.microsoft.com/en-us/library/362314fe(VS.71).aspx.
http://msdn.microsoft.com/en-us/library/aa691153(VS.71).aspx

Do you know what a stack is? Do you know what interning is? Do you know you can write: string s = null;?

String is a reference type that often "behaves" like a value type.

To quote you directly: "If you dont know anything - dont confuse others!!!"

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / abhi

hey is the discussion over guys ....
can any one tell me what is array and arraylist of which type???

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / kishore.a

String is a reference type.

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / subbu

string is absolutely reference type but value type and reference types can be changed to reference type and value type by boxing and un boxing mechanism.

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / djfox7200x

Strings are immutable.Hence they behave like a value type
when they are actually reference type;

eg. string objA="cat";
//cat is an immutable string in memory and objA points to
it.
string b=a; //reference is copied to b;

a="dog"; new immutable object created and a points to it;

//b is still cat since its refernce has not changed

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / suresh

hi string is reference type .

if you are confused then use this link in ur browser and
you will get the answer with example...

http://www.devhood.com/tutorials/tutorial_details.aspx?
tutorial_id=733

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / nuthead

hi way all stop it`s the most funny post in the all internet
please continue the discussion please please please

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / vijeesh meethale edathil

absolutely string is reference type
value types are int ,char,float ets
other reference types are class,interface,delegates,structs,etc

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / shemeem

Actually Which is true??Value type or Reference type??

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / who am i

how do you explain this?

private void MyTest()
{
MyClass myClass = new MyClass();
myClass.value = 1;
MessageBox.Show(myClass.value.ToString()); //1
MyClass newClass = myClass;

newClass.value = 2;
MessageBox.Show(myClass.value.ToString()); //2


String myStr = new String("1".ToCharArray());

MessageBox.Show(myStr); //1
String newStr = myStr;

newStr = "2";
MessageBox.Show(myStr); //1 -- Shouldn't it
display 2???
}

public class MyClass
{
public int value=0;

}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is difference between write and writeline?

0 Answers  


What is thread.sleep()?

0 Answers  


How many types of interface are there in c#?

0 Answers  


i have a table named login in mysql database containing (empid,fname,lname,mobno,emailid,usrname,usrpwd) i have 2 textboxes in which i enter my username and pwd..so based on what is entered in those textboxes it should retreive all other details of dat username in the remaining 6 textboxes..i want the code for this...

1 Answers   Royal Enfield,


What is method overriding in c#

0 Answers  


Explain what is an interface in c#?

0 Answers  


What is the difference between decimal and integer?

0 Answers  


wipro interview question on 28-Apr-10 1.what type of authentication used in web service, 2.what are type of multithreding ? 3.diff bet delegate and multithreading? 4.how to write update query trigger in stored procedure. 5. if you are so sharp then what happens when you click .net appln exe in system,who CLR get loaded. 6.how to use work flown in application. 7.what is main purpose of script manager. 8.how u handle cretical transaction. 9.how you syncronize the method from no of user, 10.how change name of shared assambly

1 Answers  


What is icomparer in c#?

0 Answers  


What is overriding in c#?

0 Answers  


How to make sure custom class supports deterministic finalization?

1 Answers   IBM,


What is difference between Method and function

3 Answers  


Categories