The video below demonstrates how to create a program that generates a random number, written in C#. If you wish not to watch the video please feel free to copy the code below and paste it into your own program, but remember make it your own! Once you've got this done and dusted there are some really cool things that you can do with it. For exmaple a guessing game could be made where the computer generates a random number and the user has to guess what the exact number is, with only a certian amout of guesses.
type the following into your code-behind. Enjoy guys!
Random rnd = new Random();
int num1 = rnd.Next(1, 11);
TextBox1.Text = num1.ToString();