Good day guys, I'm a semi-intermediate here in c#. Actually, the said topic name it won't work with my codes implemented, i need some help on how to improve my timer tick procedure code as shown what I've tried below.
- private void timer1_Tick(object sender, EventArgs e)  
-       {  
-           statmessage();  
-   
-           int i = listBox1.SelectedItems.Count + 1;  
-           do  
-   
-           {  
-               var exp = (EItem)listBox1.Items[i];  
-               var timeVisible = DateTime.Now - exp.Added;  
-               if (timeVisible.TotalSeconds > 5)  
-                   if (counter == 100)  
-                   {  
-   
-                       SendMessage();  
-                       counter = counter - 1;  
-                       ++i;  
-                   }  
-                   else if (counter <= 0)  
-                   {  
-   
-                       statmessage();  
-                   }  
-   
-           } while (i < -1);  
-           }  
-   
-       }  
-   }   
Your feedback is highly appreciated and will help to improve the said concern, Thank you very much.