In my application, a string generated its length can varying from 1 to 100 (not using random number algo). But I want if length is less than 7 than need to add integers 1,2,3.. untill its size reach to 7. I implements it using while loop as :
If generatedUserName.Length < 7 Then
Dim count As Int32 = 0
While generatedUserName.Length < 7
generatedUserName = generatedUserName & count.ToString()
count = count + 1
End While
End If
Is any other better way such as enbuild function Tostring() with some parameter?