String Function for .NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In vb6, the String(Number, Character) function would let you generate a
string filled with a certain character.

How can I do this in .NET, since there is no String function and I had
trouble finding this in help?

Thanks a lot!
 
One of the String constructor overloads supports this. So, New String ('A',
10) will get you a string with A repeated 10 times.

HTH

In vb6, the String(Number, Character) function would let you generate a
string filled with a certain character.

How can I do this in .NET, since there is no String function and I had
trouble finding this in help?

Thanks a lot!
 
Shiva said:
One of the String constructor overloads supports this. So, New String ('A',
10) will get you a string with A repeated 10 times.

Alternatively you can use 'Microsoft.VisualBasic.Strings.StrDup'.
 
Back
Top