C# 字符串

 
字符串判断为空
    if(a == "") 最慢
    if(a == string.Empty) 其次
    if(a.Length == =) 最快

字符串拼接
    += 最慢 远远慢于其他三种
    string.Format()慢
    string.concat()其次
    StringBuilder.Append() 最快
 
 
 
posted @ 2023-08-10 16:03  秋叶愁  阅读(31)  评论(0)    收藏  举报