最后分数谁给我把这段VB转成C#.NET
Public Function HEX_to_DEC(ByVal Hex As String) As Long
Dim I As Long
Dim b As Long
Hex = UCase(Hex)
For I = 1 To Len(Hex)
Select Case Mid(Hex, Len(Hex) - I + 1, 1)
Case "0 ": b = b + 16 ^ (I - 1) * 0
Case "1 ": b = b + 16 ^ (I - 1) * 1
Case "2 ": b = b + 16 ^ (I - 1) * 2
Case "3 ": b = b + 16 ^ (I - 1) * 3
Case "4 ": b = b + 16 ^ (I - 1) * 4
Case "5 ": b = b + 16 ^ (I - 1) * 5
Case "6 ": b = b + 16 ^ (I - 1) * 6
Case "7 ": b = b + 16 ^ (I - 1) * 7
Case "8 ": b = b + 16 ^ (I - 1) * 8
Case "9 ": b = b + 16 ^ (I - 1) * 9
Case "A ": b = b + 16 ^ (I - 1) * 10
Case "B ": b = b + 16 ^ (I - 1) * 11
Case "C ": b = b + 16 ^ (I - 1) * 12
Case "D ": b = b + 16 ^ (I - 1) * 13
&nb