2D array to table in c#?

前端 未结 3 1052
渐次进展
渐次进展 2021-01-29 10:36

I need to put the data from this table into an array and then make the array print as a formatted table in the console. Here\'s the table that I got my data from http://puu.sh/

3条回答
  •  醉梦人生
    2021-01-29 11:15

    If you use a monospaced font in the console you can adjust where each thing displays by putting more spaces if necessary

    For example for the members corresponding to the the 1st and 2nd row and 1st of second column this would be the thing to calculate:

    Largest word is Wednesday that is 9 letters, on first row first column I should put 9 espaces as there would be a blank. Then you might put four spaces as a separator between columns, then for the second column you calculate that 1:00 is the largest string so for 12 you would add 2 extra spaces, and so on.

    Using a tab instead of some spaces is also likely to work but if the table ends up having some string that is much larger than one in another column it won't work.

    Hope it helps.

提交回复
热议问题