Add whitespace to stringbuilder?

How to add empty space to row builder? I need to insert 90 spaces, in VB I had this code, but I was confused how to write in c# can anyone help me

 Dim S As New StringBuilder("HELLO") S.Append(" "c, 90) S.Append("WORLD") MessageBox.Show(S.ToString) 

Thanks.

+6
source share
2 answers
 S.Append(' ', 90); 

who should do it.

+10
source
 StringBuilder s = new StringBuilder().Append("Hello").Append(' ', 90).Append("world"); 
+6
source

Source: https://habr.com/ru/post/897731/


All Articles