用vb创建一个控制台应用程序

Module Module1

    Sub Main()
        Dim strTmp As String = "abcdefg某某某"
        Dim i As Integer = System.Text.Encoding.Default.GetBytes(strTmp).Length
        Dim j As Integer = strTmp.Length

        Console.WriteLine(i) '13
        Console.WriteLine(j) '10
        Console.ReadKey()

    End Sub

End Module

猜你喜欢

转载自blog.csdn.net/qq_35106907/article/details/81457207