For generating a random number, you can use the Random class in C# that resides in the "System" Namespace.
Random r = new Random();
int num=r.Next();
string sts=num.ToString();This code snippet explains how to generate random numbers in C#.
Random r = new Random();
int num=r.Next();
string sts=num.ToString();