Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,887 questions

51,814 answers

573 users

How to generate 8 digit random number in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Const N As Long = 20

        Dim rng As New Random

        For i As Integer = 0 To N
            Console.WriteLine(rng.Next(10000000, 99999999))
        Next

    End Sub

End Module

' run:
' 
' 84805246
' 40791991
' 43465918
' 41106946
' 52496034
' 28202902
' 37175445
' 46462133
' 93359669
' 89983710
' 51626259
' 68803831
' 33527303
' 72751126
' 94377711
' 20097789
' 35036802
' 22649352
' 63012015
' 64572791
' 58919953

 



answered Apr 27, 2016 by avibootz

Related questions

1 answer 107 views
1 answer 156 views
1 answer 179 views
1 answer 348 views
1 answer 182 views
1 answer 170 views
170 views asked Apr 27, 2016 by avibootz
...