.net里如何判断字符长度
protected int GetLength(string strValue)
{
byte[] myByte = System.Text.Encoding.Default.GetBytes(strValue);
return myByte.Length;
}
protected int GetLength(string strValue)
{
byte[] myByte = System.Text.Encoding.Default.GetBytes(strValue);
return myByte.Length;
}