主题:请教,从VB到VB.net转换LSet的问题
我定义了两个结构
Structure MyISingle
Dim SData As Single
End Structure
Structure MyInteger
Dim IData As Integer
End Structure
在转换LSet时出现问题,Data=1时,vb执行 LSet i = s 后,i.IData=1065353216.而vb.net执行时怎样使i.IData也得到同样的值?(LSet 在vb.net中已改变)
Public Function ToInt(Data As Single) As Long
Dim s As MyISingle
Dim i As MyInteger
s.SData = Data
LSet i = s
......
End Function
Structure MyISingle
Dim SData As Single
End Structure
Structure MyInteger
Dim IData As Integer
End Structure
在转换LSet时出现问题,Data=1时,vb执行 LSet i = s 后,i.IData=1065353216.而vb.net执行时怎样使i.IData也得到同样的值?(LSet 在vb.net中已改变)
Public Function ToInt(Data As Single) As Long
Dim s As MyISingle
Dim i As MyInteger
s.SData = Data
LSet i = s
......
End Function