一位同事刚刚在C#中创建了以下构造(示例代码已简化)。他的目标是缩短代码其余部分中所有预定义字符串的表示法。publicstructPredefinedStrings{publicconststringVeryLongName="VeryLongName";publicconststringAnotherVeryLongName="AnotherVeryLongName";publicconststringTheLastVeryLongName="TheLastVeryLongName";}publicstaticvoidMethodThatUsesTheNames(){Console
一位同事刚刚在C#中创建了以下构造(示例代码已简化)。他的目标是缩短代码其余部分中所有预定义字符串的表示法。publicstructPredefinedStrings{publicconststringVeryLongName="VeryLongName";publicconststringAnotherVeryLongName="AnotherVeryLongName";publicconststringTheLastVeryLongName="TheLastVeryLongName";}publicstaticvoidMethodThatUsesTheNames(){Console