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");
原文地址:https://www.cnblogs.com/wwz-wwz/p/7040654.html