private
static
string
GenerateOTP()
{
Random
generator = new
Random();
String
r = generator.Next(0, 1000000).ToString("D6");
if
(r.Distinct().Count() == 1)
{
r
= GenerateOTP();
}
return
r;
}
No comments:
Post a Comment