c# strings are reference types - why when i change reference A's value, reference B doesn't change?

后端 未结 4 951
無奈伤痛
無奈伤痛 2020-12-12 05:08

If strings in .NET are reference types, in the below code, why doesn\'t string2 change to \"hi\" after string1 is changed?

static void IsStringReallyAReferen         


        
4条回答
提交回复
热议问题