How to Generates 10 digit Random Numbers in

Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 2716
The below code will do this

Imports System.Linq

Namespace ConsoleApplication1
Class Program
Private Shared Sub Main(args As String())
Dim str = GetTenDigitRandomNumbers()
End Sub

Public Shared Function GetTenDigitRandomNumbers() As String
Dim generator As New Random()
Return generator.[Next](0, 1000000).ToString("D10")
End Function
End Class
End Namespace

Comments or Responses

Login to post response