0

i'm trying to fill one line of my label with hyphens. Here's what i got right now. what is the function that i can use to fill the next line without manually typing out all the hyphens?

lblResumé.Text = intNbrTotTut.ToString() + str1erePhrase + Environment.NewLine
MrWizo
  • 3
  • 1
  • 3
    Possible duplicate of [Best way to repeat a character in C#](https://stackoverflow.com/questions/411752/best-way-to-repeat-a-character-in-c-sharp) – bgfvdu3w Oct 03 '17 at 02:23
  • didnt really work in my situation. – MrWizo Oct 03 '17 at 02:34
  • 2
    Why doesn't the linked post _"work in your situation?"_ You'll need to clarify your question. – EdSF Oct 03 '17 at 02:40

1 Answers1

0
string myString = "Test" + Environment.NewLine + "Test2" +Environment.NewLine;
label1.Text = myString.Replace(System.Environment.NewLine, "_");
Kassapa
  • 139
  • 6