I am working on a windows application using c#.
I have a form and a class having all methods .
I have a method in class in which i am processing some files in arraylist. I want to invoke progress bar method for this file processing but its not working.
Any help
PFB my code snippet:
public void TraverseSource()
{
string[] allFiles1 = Directory.GetFiles(sourcePath, "*.xml", SearchOption.AllDirectories);
var allFiles = new ArrayList();
var length = allFiles.Count;
foreach (string item in allFiles1)
{
if (!item.Substring(item.Length - 6).Equals("MD.xml"))
{
allFiles.Add(item);
// Here i want to invoke progress bar which is in form
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…