[C#] Some help with a few things

Joined
May 18, 2007
Messages
1,787
Reaction score
291
What I'm trying to do is get the first array from xmlfilename then find a matching one in dirfilename. moving to the next array when done.

Code:
public static void test()
        {
            i = 0; i = 0; v = -1; v2 = -1;
            foreach (string file in dirfilename)
            {
                var durr = Directory.GetCurrentDirectory().ToCharArray();
                string search = dirfilename[i2].ToString();
                int dur = dirfilename.BinarySearch(search);
                var a = xmlfilename[dur];
                var b = dirfilename[i];
                while (a.Equals(b))
                {
                    Console.WriteLine("yup");
                    Thread.Sleep(1);
                }
                    i = ++v;
            }
            Thread.Sleep(1);
        }
.
 
Last edited:
Code:
        static void Main(string[] args)
        {
            string[] myFiles = new string[1]; // your list of files form xml or whatever you have there
            myFiles[0] = "C:\\ATI\\Support\\11-5_vista64_win7_64_dd_ccc_ocl\\Packages\\Drivers\\WDM\\HDMICE\\LH64a\\AtihdLH6.msi";

            string[] filePaths = Directory.GetFiles("C:\\ATI", "*", SearchOption.AllDirectories);

            foreach (string myFile in myFiles)
            {
                if (filePaths.Contains<string>(myFiles[0]))
                {
                    Console.WriteLine("File is there!");
                }
            }
            Console.ReadLine();
        }

Maybe something like this? I think I misunderstood something.
 
Back