【发布时间】:2011-05-04 20:20:57
【问题描述】:
我使用的重构工具经常建议我更改如下内容:
string title = "Some title.";
到
const string title = "Some title.";
为什么,有什么区别?
谢谢!
【问题讨论】:
-
真的建议重命名吗?
-
不,那是我的错误。
-
无耻自插:stum.de/2009/01/14/… 展示了如何编译 const 字符串。
标签: c# refactoring