How to

repeat character

Published: 30. November 2011 | Updated: 30. November 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Strings
Tags: C# Text
Was this snippet helpful for you? YESYES / NONO

Code

int count = 15;
string text = new string('x', count);

Console.WriteLine(text);
Console Output:
xxxxxxxxxxxxxxx
Send us feedback about this snippet »



Related Snippets: