vb.net
Dim sTest As String = "2A三b四S"
Dim bByte() As Byte = System.Text.Encoding.Default.GetBytes(sTest)
Dim sName As String = System.Text.Encoding.Default.GetString(bByte)
MessageBox.Show(sName)
C#.net
string sTest = "2A三b四S"; byte[] bByte = System.Text.Encoding.Default.GetBytes(sTest); string test = System.Text.Encoding.Default.GetString(bByte); MessageBox.Show(bByte.Length.ToString() + " " + test);
原文链接:https://www.f2er.com/vb/260169.html