VB.NET里面的简单二小个有关问题
VB.NET里面的简单二小个问题
1:
怎么样写完整
这个怎么用啊, 怎么调到Get方法和Set方法
2 VB.NET怎么样强制类型转换啊??
java中是: int aa = (int)11.1
vb.net 应该怎么写啊
------解决方案--------------------
第一个我记不太清楚了,
回答一下第二个
1:
- VB.NET code
Protected Property id() Get End Get Set(ByVal value) End Set End Property
怎么样写完整
这个怎么用啊, 怎么调到Get方法和Set方法
2 VB.NET怎么样强制类型转换啊??
java中是: int aa = (int)11.1
vb.net 应该怎么写啊
------解决方案--------------------
第一个我记不太清楚了,
回答一下第二个
- VB.NET code
int aa = CInt(11.1)
------解决方案--------------------
第一个试试这样行不.
- VB.NET code
Private Kabuid As String Public Property id() As String Get Return Kabuid End Get Set(ByVal value As String) Kabuid = value End Set
------解决方案--------------------
第一个是设置一个类的属性,像text控件的text属性一样
Protected Property id()
Get
return id
End Get
Set(ByVal value)
id=value
End Set
End Property
y就可以用了
------解决方案--------------------
------解决方案--------------------
这个~~~东西,叫结构~~~吧~我是来打酱油的
------解决方案--------------------
- VB.NET code
Public Class aa Private user As String Public Property use() Get Return user End Get Set(ByVal value) user = value End Set End Property End Class Public Class bb Public Sub check() Dim a As New aa a.use = "abc" Debug.Print(a.use) End Sub End Class
------解决方案--------------------
VB.NET怎么样强制类型转换啊??
java中是: int aa = (int)11.1
VB.NET CODE:
Dim aa As Integer = CType(11.1, Integer)
------解决方案--------------------
Dim a As Integer = Int(11.1)
Dim b As Integer = CInt(11.1)
Dim c As Integer = CType(11.1, Integer)
Dim d As Integer = Convert.ToInt32(11.1)
Dim f As Integer = Val(11.1)
------解决方案--------------------