How can I align text in columns using Console.WriteLine?

前端 未结 8 1230
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 22:11

I have a sort of column display, but the end two column\'s seem to not be aligning correctly. This is the code I have at the moment:

Console.WriteLine(\"Cust         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 23:01

    You could use tabs instead of spaces between columns, and/or set maximum size for a column in format strings ...

提交回复
热议问题