I am not sure on which component you want to create. But for achieving random nos you could see
Random
class is there in .Net framework, That you can display random no in any of control as you haven't specified type of your UI so I am not getting much idea on the same.
Like if you want to find random between 1 and 9 then follow following snippets.
private int RandomNumber()
{
Random random = new Random();
return random.Next(1, 10);
}
See
THIS[
^] article for more.
[Small correction: Upper bound in Random.Next
is never reached.]