Home > Software design >  Injection of blank characters into a variable
Injection of blank characters into a variable

Time:11-13

string blankChar = "               "; /15 characters

Is there a nicer way to do this?

Like: blankChar[15] = " ";

CodePudding user response:

yes there are many ways, but this string s = new string(' ', 15); looks simple.

  • Related