Strings

The only formatting available to Strings is the padding option, which can be positive or negative depending on whether the string should be left- or right-aligned:

String.Format("'{0,10}'", "John");

-> ' John'

String.Format("'{0,-10}'", "John");

-> 'John '

arrow
arrow
    文章標籤
    C#.NET
    全站熱搜

    黒森林蛋糕 發表在 痞客邦 留言(0) 人氣()