.net里如何判断字符长度

protected int GetLength(string strValue)
     {
         byte[] myByte = System.Text.Encoding.Default.GetBytes(strValue);
         return myByte.Length;
     }

 

posted @ 2014-12-02 12:14  neusoft06  阅读(843)  评论(0编辑  收藏  举报
分享到: 更多