1、Remove
例:
StringBuilder val = new StringBuilder();
val.Append("....");
val.Remove(0,val.Length);//清空
2、Replace
StringBuilder val = new StringBuilder();
val.Append("....");
val.Replace(val.ToString(), "");//清空
3、Length
StringBuilder val = new StringBuilder();
val.Append("....");
val.Length = 0;//清空
参考:http://www.cnblogs.com/SpiderKevin/p/3891425.html
时间: 2024-11-03 21:57:28