C#到VB.NET:**的**默认的关键字? [英] C# to VB.NET: the **default** keyword?
本文介绍了C#到VB.NET:**的**默认的关键字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
href="http://stackoverflow.com/questions/354136/default-value-for-generics">默认值
Possible Duplicate:
Default value for generics
确定,所以在翻译从C#VB.NET约code,我遇到了默认关键字,我只是用替换它的什么
OK, so while translating some code from C# to VB.NET, I came across the default keyword, and I'm simply replacing it with nothing.
这是正确的方式做到这一点,还是有更好的翻译为关键字?
Is this the proper way to do it, or is there a better "translation" for that keyword?
推荐答案
是啊,这是绝对的罚款。虽然没有
是一般的意思是说的C#的空
,它可以用来等价值类型来,意味着该类型的默认值。
Yup, that's absolutely fine. While Nothing
is usually meant to mean the equivalent of C#'s null
, it can be used with value types to, to mean "the default value of that type".
这篇关于C#到VB.NET:**的**默认的关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文