.net里如何判断字符长度

protected int GetLength(string strValue)
     {
         byte[] myByte = System.Text.Encoding.Default.GetBytes(strValue);
         return myByte.Length;
     }
原文地址:https://www.cnblogs.com/haiy/p/4137107.html