If i understand you right, you want to repeat a character automatically.
Then, try the cool overloaded String constructor of signature:
...ctor ( char c, int count )
// Writes
"--------------------------------------------------------------------------------"
sw.WriteLine(new string('-', 80));
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"John Sutor" <jo********@cinfin.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
I want to write a line to a text file that looks like this
-----------------------------------------------
How can I do this without doing this manually and assigning it to a
variable.
Ex. string x = Char('-') * 80
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!