Tag | string Posts

When we use string so often for its value-like behavior, it is easy to forget that the String class comes with its own constructors, and that there are some tasks you can achieve with the string constructor that you might have overlooked otherwise. Repeating characters One of the more useful overrides of the String constructor is the ability to easily repeat any character a number of times. Here’s a brief example: Dim horizontalRule As New String("-"c, 100) Console.WriteLine(horizonta... Subsections ...