Possible Duplicate:
C# string reference type?
Say, I have a string called
string sample = "Initial value";
After passing to a method test()
public static void Test(string testString)
{
testString = "Modified Value";
}
If i print 'sample' after passing Test(sample), I except it should print "Modified Value".
But its printing "Initial Value". Why is that case if string is reference type?
But the same (expected logic), working for object. can someone please clear me?