public string[] string1 = { "a", "b", "c", "d", "e", "f", "g" };
我要做个这的动态数组的循环,让每天显示一个字母 怎么做啊

解决方案 »

  1.   

    循环
    for(int i=0;i<string1.length;i++)
    {
    MessageBox.show(string1[i]);
    Thread.Sleep(一天);
    }
      

  2.   

    int i=0;
    while(true)
    {
       textBox1.text=string1[i];
       Thread.Sleep(1天);
       i++;
       if(i>=string1.Length) i=0;
    }
      

  3.   

    int count;
    string[] string1 = { "a", "b", "c", "d", "e", "f", "g" };
    private void Form1_Load(object sender, EventArgs e)
    {
        Timer t = new Timer();
        t.Interval = 24*3600*1000;
        t.Tick += new EventHandler(t_Tick);
        t.Start();
        this.Text = string1[count];
        count++;
    }        
    void t_Tick(object sender, EventArgs e)
    {            
        this.Text = string1[count % 7];
        count++;
    }