Random number : Random « Development « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Development » RandomScreenshots 
Random number
Random number
  
Imports System

Public Class MainClass
    Shared Sub Main()
        Dim objRandom As New Random()
        Dim intRandomNumber As Integer = 0

        'Process the loop until intRandomNumber = 10
        Do Until intRandomNumber = 10
            'Get a random number between and 24
            intRandomNumber = objRandom.Next(25)
            'Add the number to the list
            System.Console.WriteLine(intRandomNumber)
        Loop
    End Sub
End Class

           
         
    
  
Related examples in the same category
1.Generate a Random NumberGenerate a Random Number
2.Generating Random Numbers between the optional Low and High parameters
3.Returns a random number between the optional Low and High parameters
4.Random Class represents a pseudo-random number generator
5.Generate and display 5 random byte (integer) values
6.Generate and display 5 random integers
7.Generate and display 5 random integers between 0 and 100
8.Generate and display 5 random integers from 50 to 100
9.Generate and display 5 random floating point values from 0 to 1
10.Generate and display 5 random floating point values from 0 to 5
11.Create Random class, using the specified seed value.
12.Random.Next Method returns a nonnegative random number less than the specified maximum.
13.No bound random number
14.Generate random numbers with an upper bound specified
15.Generate random numbers with both bounds specified
16.Random.Next Method (Int32, Int32) returns a random number within a specified range.
17.20 random integers from 1000 to 10000
18.20 random integers from 1 to 10
19.Random.NextBytes fills the elements of a specified array of bytes with random numbers.
20.Random.NextDouble returns a random number between 0.0 and 1.0.
21.Distribution of Random Numbers
22.IPHostEntry: Internet host address information.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.