我试图获得Visual Basic。 c#
中此函数的净当量public bool IsBomb { get { return number == -1; } }
我尝试了Get函数,但我不确定如何在vb.net中实现它
答案 0 :(得分:3)
Public ReadOnly Property isBomb as Boolean
Get
return (number = -1)
End Get
End Property
答案 1 :(得分:1)
在MSDN上阅读有关在VB.NET中实现属性的文档。
答案 2 :(得分:0)
Public ReadOnly Property IsBomb As Boolean
Get
Return CBool(number = 1)
End Get
End Property
为了将来参考,有一个很好的网站可以将C#转换为vb.net,反之亦然。 http://www.developerfusion.com/tools/convert/vb-to-csharp/