C#中字符数与字节数的区别

转:
//取字符串长度  
  s   =   "iam张宇湘";  
  
int   len   =   s.Length;//will   output   as   6  
  byte[]   sarr   =   System.Text.Encoding.Default.GetBytes(s);  
  len   
=   sarr.Length;//will   output   as   3+3*2=9



原文地址:https://www.cnblogs.com/xiang/p/918957.html