I am creating a C# program that outputs text to a file. I want to align all information based of a set specification. For example, I want line# to have 20 chars of space, message info to have 25 chars of space. If the space is unused I want it to be empty spaces. I have searched everywhere and haven’t been able to find anything to work.
I have included a basic example below. I used the periods for formatting in the post, I do not want to use them in my output.
Line #1.............Message Info #1 Line #15............Message Info #15 Line #534...........Message Info #534
Look here net format a string with fixed spaces