为什么"串QUOT;认为"一个简化版本;串QUOT ;? [英] Why is "string" considered a simplified version of "String"?
问题描述
在C#中我通常使用字符串
当我使用的方法和字符串
声明变量时。我读其他地方,这是保持干净的东西的首选方法,而且对我有意义。在Visual Studio 2015年,我得到一个新的消息我还没有得到,当我使用之前字符串
:名称可以简化
。该VS建议是使用字符串
代替。
In C# I usually use String
when I'm utilizing a method and string
when declaring a variable. I read elsewhere that this is the preferred method to keep things clean and that made sense to me. In Visual Studio 2015, I'm getting a new message I haven't gotten before when I use String
: Name can be simplified
. The VS suggestion is to use string
instead.
为什么字符串
现在优于字符串
在VS2015,而这在2013年是不是??
Why is string
now preferred over String
in VS2015 whereas it wasn't in 2013??
不是重复这个问题。那一个问有什么区别总体来说,我问为什么VS现在暗示了另一种;我不知道,如果一个技术差别已更改或诸如此类的话。
Not a duplicate of this question. That one asks what the difference is overall, I'm asking why VS is now suggesting one over the other; I don't know if a technical difference has changed or something to that effect.
推荐答案
由于您没有取消体型内在的预定义类型的关键字声明当地人,在文本编辑器中选择参数和成员的时候,C#代码风格
Because you didn't uncheck "Prefer intrinsic predefined type keyword when declaring locals, parameters and members" in Options under Text Editor, C#, Code Style
这篇关于为什么"串QUOT;认为"一个简化版本;串QUOT ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!