Code:

		private void btnGo_Click(object sender, System.EventArgs e)
		{
			tbxPass.Text = "";
			Random rnd = new Random();

			try
				  {
			int no = Convert.ToInt32(nud.Text) + 1;

			for (int i = 1; i < no; i++)
			{
			   tbxPass.Text += chars[rnd.Next(0, 61)];
			}
				  }
			catch  {}


		 }