2
Easy to use tips and articles on VB.NET
Sunday, February 06, 2011Posted by admin
How to generate a random number in vb.net Function GenerateRandomNumber(iLowerRange As Integer, iUpperRange As Integer) as integer Dim RandomGenerator As Random Dim intRandomNumber As Integer RandomGenerator = New Random() 'Get the next random number intRandomNumber = RandomGenerator.Next(iLowerRange, iUpperRange+ 1) 'Return the random # as the function's return value return intRandomNumber End Function
Comments
Comment#23 Friday, February 11, 2011 Posted by Sumeet Singh
Simple and easy articles on practical tips in using vb.net to develop windows and ASP.NEt applications.