Is string reference type / value type?
Answers were Sorted based on User's Feedback
Answer / gomti
please visit http://msdn.microsoft.com/en-
us/library/ms228362.aspx
| Is This Answer Correct ? | 1 Yes | 1 No |
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 |
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 |
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 |
Answer / sumesh s.g
Any one can give pakka anser with perfect example...
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
Answer / habitat
If you dont know anything - dont confuse others!!!
String is 100 % value type!!!!
| Is This Answer Correct ? | 1 Yes | 1 No |
Are arraylist faster or arrays?
Can we inherit an abstract class in another abstract class. If no why and If yes how..?
Which constructor is called first in c#?
if i used stored procedure for retrieving the data from sql server.in front end i had used data reader.when 100 records are there in table.when it has displayed ten records in frontend database has been collapsed.then where should our data available...
Is there regular expression (regex) support available to c# developers?
In c#, what will happen if you do not explicitly provide a constructor for a class?
What is private class in c#?
Can constructor have return type c#?
Why c# is type safe?
Contrast between an interface and abstract class?
What is getenumerator?
Can an abstract class have a constructor c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)