Is string reference type / value type?

Answers were Sorted based on User's Feedback



Is string reference type / value type?..

Answer / lithi

String is Reference Type

Is This Answer Correct ?    1 Yes 0 No

Is string reference type / value type?..

Answer / vamsi

string is reference type only...

Is This Answer Correct ?    1 Yes 0 No

Is string reference type / value type?..

Answer / gomti

please visit http://msdn.microsoft.com/en-
us/library/ms228362.aspx

Is This Answer Correct ?    1 Yes 1 No

Is string reference type / value type?..

Answer / malli

String Is Reference Type Ex

string StrName1 = "Test";
string StrName2 = StrName1;
StrName2="Test1";
Console.WriteLine("StrName1="+StrName1);
Console.WriteLine("StrName1=" + StrName2);

Object objStrName1 = "Test";
Object objStrName2 = objStrName1;
objStrName2 = objStrName1;
objStrName2 = "Test1";
Console.WriteLine("objStrName1=" + objStrName1);
Console.WriteLine("objStrName2=" + objStrName2);
Console.WriteLine("Malli");

OutePut:-

StrName1=Test
StrName1=Test1
objStrName1=Test
objStrName2=Test1

No More Discusion...

Is This Answer Correct ?    1 Yes 1 No

Is string reference type / value type?..

Answer / baranee

Sorry guys bit of careless ..In the previous post I have
made a mistake string is a reference type not a value type.

Again, String is a reference type.

Is This Answer Correct ?    1 Yes 1 No

Is string reference type / value type?..

Answer / naim

string is reference type, Please visit follwing link

http://msdn.microsoft.com/en-us/library/362314fe(VS.80).aspx

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / hari

String is a reference type.

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / sumesh s.g

Any one can give pakka anser with perfect example...

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / shweta

100% String is Reference Type.

Value Type- All Numeric data types, Boolean, Char, Date,
Structs.

Reference Type- String, Arrays, Class, Delegates.

Is This Answer Correct ?    0 Yes 0 No

Is string reference type / value type?..

Answer / habitat

If you dont know anything - dont confuse others!!!
String is 100 % value type!!!!

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Sharp Interview Questions

Is it not possible to store a boolean value as a variable?

0 Answers  


How to Show Message box in Metro Style App?

0 Answers   PUCIT,


What is dependency injection in simple words?

0 Answers  


What is a three-tier application.

0 Answers   Siebel,


Are c# strings null terminated?

0 Answers  






Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

2 Answers   Siebel Systems,


In which way you can convert a value-type to a reference-type?

0 Answers   Siebel,


Why we can't create the object of abstract class ?

15 Answers   Assyst, CTS, HCL, IBM, L&T,


How many bytes is an int c#?

0 Answers  


What is Web.config?

0 Answers   Amazon,


What?s the .NET datatype that allows the retrieval of data by a unique key?

1 Answers  


What are jagged arrays used for?

0 Answers  


Categories