Tech Off Post

Single Post Permalink

View Thread: Learning C#
  • User profile image

    Hi I just want to generate a random number between 1 and 3 and post the result to the text of a label on a form, but I cant, ToString the result, can anyone help ?

    privatevoid button1_Click(object sender, EventArgs e)


      Random rnd1 = new Random(3);

        int n;

        n = rnd1.Next();

        this.label1.Text = n.ToString;