create new string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xke

    #1

    create new string

    How can I quickly create a new string containing 100 spaces in C#?
    Thanks

  • Gregg Walker

    #2
    Re: create new string

    string mystring = new string(' ', 100);


    Comment

    • rhaazy

      #3
      Re: create new string

      On Aug 3, 11:35 am, "Gregg Walker" <xy...@newsgrou p.nospamwrote:
      string mystring = new string(' ', 100);
      very interesting, i wasn't aware one could do this. SUPER post!

      Comment

      Working...