string.Format("{0,-50}", "qqqqqqqqqqqq")

Posted 王炜忠

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了string.Format("{0,-50}", "qqqqqqqqqqqq")相关的知识,希望对你有一定的参考价值。

            //sss={"100"}。有两个花括号
            string sss = string.Format("{{\"100\"}}", 100);

            //string.Format("{0,向(正为右,负为左)对齐的字符串长度}","展示的字符串"); 
            string s = string.Format("{0,-50}", "qqqqqqqqqqqq")+string.Format("{0,-30}", "wwwwwwwwwwwww");
            string ss = string.Format("{0,-50}", "qqq") +string.Format("{0,-30}", "wwwwwwwwwwwww");

 

以上是关于string.Format("{0,-50}", "qqqqqqqqqqqq")的主要内容,如果未能解决你的问题,请参考以下文章

如何反转 String.Format("0:C"..) [重复]

如何使用 Format("blah 0", someValue) 签名(如 string.format)实现 MyMethod()

C#中string.Format格式化日期

C#中 s +=string.Format("0,1*1,1=2,-4",j,i,j*i)是啥意思?

string.Format 三个参数

c#string.format的用法