selva kumar

selva kumar

  • NA
  • 557
  • 189.2k

how to generate sequece number?

May 31 2013 2:23 AM
hi i am developing windows application .i want to display sequence random number when combo box selected index changed....here is my sample code....

public partial class Form3 : Form
    {
        int i = 00;
        public string j;
        public Form3()
        {
            InitializeComponent();          
            label1.Text = DateTime.Now.ToString("dd/MM/yyyy");
            j = Convert.ToString(i);              
        }    
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox2.SelectedItem.ToString() == "ford")
            {
                label2.Text = Convert.ToString(j);
                label2.Text += 1;
            }       
        }
    }

i m getting 01 as out put...when i  am selecting again the combo box it does't display the next sequence number....my expected out put is 01,02,03,04,05.....50 while selected index changed....

can any one help me out....

Answers (3)