If you have the memory, you can read all the lines into an array using
File.ReadLines (string Path)
. Then you can figure the number of lines an move them into new arrays and do a
for each file. You can use LINQ to get the lines:
var x = File.ReadLines(@"C:\temp\connections.xml");
Use Skip after the first file.