Click here to Skip to main content
15,845,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Quote:
When I clicked the start button "downloadFile" Array sometimes cannot be clear can someone fix this code where is my problem


C#
List<string[]> downloadingSite = new List<string[]>();

private void button_Start_Click(object sender, EventArgs e)
{
    timer1.Start();
    timer1.Interval = 1500;
}

private void timer1_Tick(object sender, EventArgs e)
{
     if (Program.downloadingFile[0] != "" && Program.downloadingFile[0] != null)
            {
                dataGridReport.Rows.Add("Complete",
                                        downloadingFile[0],
                                        downloadingFile[1],
                                        progressPrecentage,
                                        downloadingFile[2],
                                        downloadingFile[3]);
               Array.Clear(downloadingFile, 0, downloadingFile.Length);
            }
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900