Re: HEX char -- > its comlement



Dim S As String = "0123456789ABCDEF"
Console.WriteLine(S)
For Each C As Char In S
Console.Write("{0:X}", (Not Integer.Parse(C.ToString(),
Globalization.NumberStyles.AllowHexSpecifier) And 15))
Next

Function NegHex(ByVal Hex As String) As String
'Converts the hex value to integer
Dim V As Int32 = Convert.ToInt32(Hex, 16)
....

Beautiful. Thanks you very much, Branco and Martin. Both these solution
look very smart. I like them.

-P

.



Relevant Pages