int countParts = 0;
List<DirectoryInfo> mydirs = new List<DirectoryInfo>();
private void _FileInformationWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
label2.Text = e.ProgressPercentage.ToString();
string[] test = (string[])e.UserState;
if (test.Length > 0)
{
foreach (string di in test)
{
DirectoryInfo mydir = new DirectoryInfo(di);
mydirs.Add(mydir);
}
countParts += 1;
DirectoryInfo parts = new DirectoryInfo("Part " + countParts);
mydirs.Add(parts);
In this case i'm adding numbers after each foreach loop. Part 1 , Part 2 , Part 3 But if I want to add Part A , Part B , Part C....in the end to start Part AA then Part AB or maybe Part A1 then Part A2 when it get to Part A10 to start Part B1 then after Part B10 to start adding Part C1 and so on.
Or maybe there something with better logic but I want to add some strings after each loop.