Padding blank space using PadRight

  • Thread starter Thread starter Bill Nguyen
  • Start date Start date
B

Bill Nguyen

I tried in vain to add blank space to the end of couple variables as below:

mPadding = Convert.ToChar(" ")

mdriverBegin.PadRight(16, mPadding)

mdriverEnd.PadRight(16, mPadding)

mSitekey.PadRight(4, mPadding)

What should I use to get a blank space?



Thanks

Bill
 
PadRight does not change the string, it returns a new string that has
been padded so you need a line like this:

mdriverBegin = mdriverBegin.PadRight(16, mPadding)
 
Thanks Chris!
This seemed to work for me.

Bill

Chris Dunaway said:
PadRight does not change the string, it returns a new string that has
been padded so you need a line like this:

mdriverBegin = mdriverBegin.PadRight(16, mPadding)
 
Back
Top