DoubleToHex 問題
程式碼如下,已知道HEX(00004248) 為50
不過我把我的程式帶進去50轉出來卻是00004049
Public Function DoubleConverToHex(Str As Double) As String
Dim B() As Byte = BitConverter.GetBytes(Str)
Dim SB As New System.Text.StringBuilder(B.Length)
'Return B(7) & B(8)
For I As Integer = 0 To B.Length - 1
SB.Append(Hex(B(I)))
Next
Dim S As String = SB.ToString
Return (S)
End Function
End Function