I want to do independent tasks of parsing multiple files in a system and get the version of each as follows:
public void obtainVersionList()
{
for(int iterator = 1; iterator < list.length; iterator++) //list stores all the file names
{
Thread t = new Thread( () => GetVersion(ref list[iterator])
//list will again store the fileVersions using GetVersion()
}
}
Here,
- I get Index out of bounds exception. How's that possible as I've checked a condition iterator < list.length. Is this due to multiple threads running?
- How to minimize the operation time when we parse multiple files in the disk?