Hi ,I want to make a project in which more than one xml files will be processed at once .In this project I tried to put xml files in array and then I used but always I get errors.My code is like that:
string[] files = { "ilk.xml", "migr.xml", "caa.xml" };
public Form1()
{
InitializeComponent();
System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(@"c:\markets\");
count = dir.GetFiles("*.xml").Length;
for (int d = 0; d < count; d++)
{
XmlDocument xmlDoc1 = new XmlDocument();
xmlDoc1.Load(files[d]);
xmldocument= new XmlDocument();
xmldocument.Load(@"C:\\markets\files[d]");
//here I compare the values of xml files
}
the error is "Could not find file 'C:\markets\files[d]".All the xml files are in the markets directory.When I wrote the file name without using array there is no problem .Can you help me?