运行图
源码
Sub Main(args As String())
跳过:
Console.Clear()
Dim inputString As String
Console.WriteLine("请输入字符串:")
inputString = Console.ReadLine()
Dim unicodeArray(inputString.Length - 1) As Integer
For i As Integer = 0 To inputString.Length - 1
unicodeArray(i) = Char.ConvertToUtf32(inputString, i)
Next
Console.Write("输出的十进制Unicode编码为:" & Environment.NewLine)
For Each code As Integer In unicodeArray
Console.Write("&#" & code.ToString() & "; ")
Next
Console.ReadLine()
GoTo 跳过
End Sub