There are nearly 150-200 char in the line from a file which i am reading
but while writing to another file i want to make it 1000 chars padding spaces after few char from a file which i am reading.
Can any one help me for the same

Recommended Answers

All 3 Replies

myString = MyString.PadRight(1000);

Adds spaces to the right side of the string until it is 1000 characters in length.

Thanks Momerath
I dont want to pad spaces of 1000.
spaces and chars overall to be 1000 char
I am not getting how to do this

It won't create a string of 1000 spaces, it will add spaces to the end of the string until it is 1000 in length. If you have 20 characters in the string already, it will add 980 spaces.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.