Is string reference type / value type?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which .gang of four. Design pattern is shown below?

576


What is the keyword used to prevent a class from being inherited by another class?

769


What is difference between assembly and namespace?

551


How many bytes is an int?

566


What are expressions c#?

581






What is Implementation inheritance

601


What is session and cookies in c#?

604


What is an escape sequence?

602


What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?

600


Name some string escape sequences in c#.

676


How is lazy loading achieved?

583


How do you remove white spaces from a string?

586


What is a cshtml file?

611


Can we declare private class in c#?

555


Why is c# used?

560