richtextbox读取问题!
如图:
我想
第一次点击"读取"  label"显示" 1;
第二次点击"读取"  label"显示" 2;
第三次点击"读取"  label"显示" 3;
想让它一直的循环下去.初学c#.大家帮忙下..实现这个小功能
------解决方案--------------------
        public int i=0;
       private void button1_Click(object sender, EventArgs e)
       {
          string[] tempArarry = new string [richTextBox1 .Lines .Length] ;
         tempArarry = richTextBox1.Lines;
           int counter = tempArarry.Length;
          if ( i <counter )
           {
               label1.Text = tempArarry[i ];
               i = i + 1;
            }
           else  
           {
               i=0;
           }
           if (i ==counter)
           {
               i = 0;
           }
       }