What is the similar setw (40) setfill ('=') of C ++ in C #?

2

When I was learning in C ++, I learned that with the iomanip library I could repeat characters like this:

cout << setw(40) << setfill('=') << endl;

Now that I'm in C # I do not know how to do it or if it's valid

    
asked by Maiev740 06.06.2018 в 01:20
source

1 answer

2

Its equivalent would be this:

string tabs = new String('=', n);

where n is the number of times to be repeated.

reference here, stackoverflow in English

    
answered by 06.06.2018 / 01:38
source