又一个 跟 Of 有关的 坎
又一个 和 Of 有关的 坎
Function Fa(Of T)(Count as T)
Dim C As UInt32 = Nothing
中间怎么写才能把 Count 的 值 付给 C
End Function
外边的调用代码是
Dim D = Fa(100)
------解决方案--------------------
Function Fa(Of T As IConvertable)(Count as T)
Dim C As UInt32 = Convert.ToUInt32(Count)
...
End Function
Function Fa(Of T)(Count as T)
Dim C As UInt32 = Nothing
中间怎么写才能把 Count 的 值 付给 C
End Function
外边的调用代码是
Dim D = Fa(100)
------解决方案--------------------
Function Fa(Of T As IConvertable)(Count as T)
Dim C As UInt32 = Convert.ToUInt32(Count)
...
End Function