Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決 
Git Repository Management

The power of Git for Enterprise teams. Stash is simple, social and secure - Try it free for 30 days >>
From our sponsors
asp.net stringbuilder的用法?
Oct 8th 2013, 01:36

大量的文字(例如,從DB裡面撈出來、資料量很大)
文字長短不一

這兩種狀況可以使用StringBuilder (System.Text命名空間)
效率會比字串相連(& 或 + 符號)更強

實際的差異,我寫了一篇文章給您參考
微軟MSDN網站的說明也很清楚

[FAQ]String(字串相連)與StringBuilder的差別、原理與優缺點?

www.dotblogs.com.tw/mis2000lab/archive/2013/09/09/msdn_string_stringbuilder.aspx

對字串值進行 "多重變更" 的作業中,您可以使用 StringBuilder 類別取代 String 類別。
 
與 String 類別執行個體不同的是,StringBuilder 物件是可變的
 
當您串連、附加或刪除字串中的子字串時,作業是在單一字串上執行。
 

當您完成修改 StringBuilder 物件的值時,可以呼叫其 StringBuilder.ToString()方法,將它轉換為字串。


This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 kko2oj3x91bmh 的頭像
    kko2oj3x91bmh

    派遣女醫x線上看 派遣女醫x劇情 派遣女醫x第2部 派遣女醫x 線上 派遣女醫x 2 派遣女醫x 2線上看 派遣女醫x第二部 派遣女醫x第2部線上看

    kko2oj3x91bmh 發表在 痞客邦 留言(0) 人氣()