Re: Character line break
From: Dennis Myrén (dennis_at_oslokb.no)
Date: 12/17/04
- Next message: Dan Bass: "Re: Character line break"
- Previous message: Mats-Lennart Hansson: "Re: Character line break"
- In reply to: John Sutor: "Character line break"
- Next in thread: Dan Bass: "Re: Character line break"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 14:41:07 +0100
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" <john_sutor@cinfin.com> wrote in message
news:ud5Dg0D5EHA.3416@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!
- Next message: Dan Bass: "Re: Character line break"
- Previous message: Mats-Lennart Hansson: "Re: Character line break"
- In reply to: John Sutor: "Character line break"
- Next in thread: Dan Bass: "Re: Character line break"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|