Saturday, July 6, 2013

Program To Generate a Random Number Using C#.Net?

                 In this article i would like to publish an article "To Generate a Random Number". 

                    In C#.Net we have an Random Class that class consists of 3 overloaded methods.Those are

  1. Next()
  2. Next(MaxValue)
  3. Next(MinValue,MaxValue)
        Next() If we uses this method it gives any random value
        Next(MaxValue) If we uses this method it gives upto the given max value range
        Next(ManValue,MaxValue) If we uses this method it gives in between min and given max values range.

Intialization of Random Class:

                                     Random O=new Random();


Random Number Generation1

Random Number Generation2

No comments: