John,
You never do anything with the result of PadRight, remember that PadRight is
a function that returns a new string. Remember that strings are immutable,
any String method that "modifies" a string returns a new instance of the
modified string, they do not change the specified instance of the string.
Try:
string hk="Assembly";
hk = hk.PadRight(35,'-');
this.textBox1.Text=hk + "Test";
Hope this helps
Jay
"john sutor" <john_sutor@NOSPAM> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Is there something wrogn with this syntax? It does not put in the padded
characters.
string hk="Assembly";
hk.PadRight(35,'-');
this.textBox1.Text=hk + "Test";
The output is AssemblyTest