I tried this code to convert Decimal to hex, but it doesn't work.
Dim i As Integer
Dim x As String = sASC
i = Convert.ToInt32(x, 16)
TextBox8.Text = i
This is what i want to conver. 912,697,583,1065,261,627,53,703,544,697,924,1003,697
I tried this code to convert Decimal to hex, but it doesn't work.
Dim i As Integer
Dim x As String = sASC
i = Convert.ToInt32(x, 16)
TextBox8.Text = i
This is what i want to conver. 912,697,583,1065,261,627,53,703,544,697,924,1003,697
You can reach your goal with a single line of code in Linq
Dim input = "912,697,583,1065,261,627,53,703,544,697,924,1003,697"
Dim result = String.Join(",", input.Split(","c).
Select(Function(x) _
Convert.ToInt32(x).ToString("X")))
Console.WriteLine(result)
' 390,2B9,247,429,105,273,35,2BF,220,2B9,39C,3EB,2B9
This will convert each value in the input string in its equivalent hex value and rebuild the string with the comma separator
Back to base 10 values is (result is from the previous code)
Dim result2 = String.Join(",", result.Split(","c).
Select(Function(x) _
Convert.ToInt32(x, 16).ToString()))
Console.WriteLine(result2)