C#清空StringBuilder的三种方法
1、Remove例:StringBuilder val = new StringBuilder();val.Append("…");val.Remove(0,val.Length);//清空2、ReplaceStringBuilder val = new StringBuilder();val.Append("…");val.Replace(val.ToString(), “”);//清空3、LengthStringBuilder val = new StringBuilder();v
原创
2021-07-02 09:47:24 ·
1485 阅读 ·
1 评论