serialization - C# write data to a file using a file format and fill string with spaces -


Someone can give me an example that is the easiest way to create a text file based on a specific format. I have the following example:

  field: position: 1: 2 creator: 3: 4 value: 7: 10 ...   

One line file Represents a data row in. If a field is less than the length specified in the format, then it should be filled with spaces.

So my question is, do I create classes with four ARMs and it should be serialized. If so, what is the easiest way to fill some parts with empty space or do you have another idea and can give an example of how I should do it in C #

Thanks!

You should look and start with it. As you would apply for the console, the quality is easy, to stop the stream properly when finished just to write, using to or dissection Remember to use.

Comments