This code show, how to Generate two random numbers , and return the number as a string value.
Public string getrandomnumber(string startnum,string Endnum)
{
DateTime tmeNow = DateTime.Now;
int Millisecond= tmeNow.Millisecond;
Random rndNumber = new Random(Millisecond);
try
{
int num1= rndNumber.Next(Tools.getInt(startnum), Tools.getInt(Endnum));
int num2= rndNumber.Next(Tools.getInt(startnum), Tools.getInt(Endnum));
}
catch
{
}
Create an item number from the random numbers
return NewNumber1.ToString() + NewNumber2.ToString();
}
No comments:
Post a Comment