System.Text.Encoding.Default.GetByteCount(str); 转载于:https://www.cnblogs.com/iiii/archive/2012/08/09/2630686.html