<分区>
Possible Duplicate:
Use of var keyword in C#
What's the point of the var keyword?
我在这里对使用隐式类型而不是显式类型感到有点困惑。
MSDN 在 C# 编码标准中引用:
Use implicit typing for local variables when the type of the variable is obvious from the right side of the assignment, or when the precise type is not important.
我的问题是,当我们已经知道底层变量类型时,为什么我们需要在这里使用隐式类型?
有什么好处?
请帮助澄清我的疑问。