string first="Example";
string second="Example";
Run Code Online (Sandbox Code Playgroud)
两个字符串具有相同的哈希码并且两个引用相同。
我的问题是:这些字符串变量在内存位置中是否有单个数据副本?
string third="Example";
static string fourth="Example";
const string fifth="Example";
Run Code Online (Sandbox Code Playgroud)
以上两套有区别吗?
c# ×1