将数据从var类型转换为Version类型(Convert data from var type to Version type)
如何在c#中将var类型的数据转换为Version类型? 我正在使用.net framework 3.5 SP1。
How to convert data from var type to Version type in c#? I am using .net framework 3.5 SP1.
最满意答案
C#中的var不是类型而是关键字。 这意味着变量的类型是从分配给它的任何东西推断出来的。
例如:
var x = new Whatever();与...完全相同
Whatever x = new Whatever();在这里阅读更多: http : //msdn.microsoft.com/en-us/library/bb383973.aspx
var in C# is not a type but a keyword. It means the type of the variable is inferred from whatever is assigned to it.
for example:
var x = new Whatever();is exactly the same as
Whatever x = new Whatever();read more here: http://msdn.microsoft.com/en-us/library/bb383973.aspx
更多推荐
发布评论