string name = "ganquanfu"; string temStr = name.Substring(0); int count = Encoding.Default.GetByteCount(temStr); MessageBox.Show(count.ToString());//输出9