Imports System
' Convert.ToInt32
Module Program
Sub Main()
Dim ch As Char = "A"c ' Unicode/ASCII value for "A" = 65
' Alternative without AscW
Dim code2 As Integer = Convert.ToInt32(ch) ' AscW(ch)
Console.WriteLine($"Convert.ToInt32: {code2}")
End Sub
End Module
' run:
'
' Convert.ToInt32: 65
'