If we go to definition of string class in Visual Studio it represent string as sealed class (reference type) as per below screen shot:
![alt text][1]
Then after If I tested the following code then it behaves like value type.
static void Main(string[] args)
{
string name = "test";
ChangeName(name);
Console.WriteLine(name); // this will still refer to test not test2 so behaves like ValueType
Console.ReadKey();
}
public static void ChangeName(string name)
{
name = "test2";
}
We can also assign null value to string. So in this way string behaves like reference type.
So I am enthusiastic to know the reason why string behaves sometime as ValueType and Sometimes as Reference Type
[1]:
http://techoverflow.int.thomsonreuters.com/upfiles/Capture_5.PNG