compare file with other 14 files
 i want to compare file1 with another 14 file one at each time what i want to are : 
 read file1 and read other file from the the 14 files the then find the number of match (words) between two files 
compute the number of words for each another 14 file (one in each time )
 i try  the  code below : `

    




        static void Main()
        {
            StreamReader objReader = new StreamReader(@"c:\basic_source.txt");
            string filepath = "";
            ArrayList arrText = new ArrayList();
            while (filepath != null)
            {
                filepath = objReader.ReadLine();
                if (filepath != null)
                    arrText.Add(filepath);

            }
            objReader.Close();

            //string path;
            //path = filepath;
            // Read the file and display it line by line.
            int found;
            int count = 0;
           string [] cc;
            int basic_source_attr_no = 20;
            float simi_degree;
            string textData = File.ReadAllText(@"C:\expermentaldata\s3\attributes.txt");
            int cnt = (WordCounting.CountWords1(textData));
            string[] content = File.ReadAllLines(@"C:\expermentaldata\s3\attributes.txt");
            //int cnt = content.Count();
            
            

            string[] mastercontent = File.ReadAllLines(@"C:\basic_source.txt");
           
            foreach (string con in content)
            {

                if (mastercontent.Contains(con))
                {
                    found = 1;
                    count = count + found;

                }


            }

            simi_degree = (basic_source_attr_no + cnt) / count;

            try
            {

                simi_degree = (basic_source_attr_no + cnt) / count;

            }
            finally
            {
                Console.WriteLine(" ");
            }
            Console.WriteLine("external attribute no      similar attributes    simi_degree      ");
            Console.WriteLine("---------------------------------------------------------------");

            Console.WriteLine("  {0}                             {1}                {2}        ", cnt, count, simi_degree);

            Console.ReadLine();

        }

    }

    public static class WordCounting
    {
        /// <summary>
        /// Count words with Regex.
        /// </summary>
        public static int CountWords1(string s)
        {
            MatchCollection collection = Regex.Matches(s, @"[\S]+");
            return collection.Count;
        }
    }
}



`





compare file with other 14 files
===

 i want to compare file1 with another 14 file one at each time what i want to are : 
 read file1 and read other file from the the 14 files the then find the number of match (words) between two files 
compute the number of words for each another 14 file (one in each time )
 i try  the  code below : `

    




        static void Main()
        {
            StreamReader objReader = new StreamReader(@"c:\basic_source.txt");
            string filepath = "";
            ArrayList arrText = new ArrayList();
            while (filepath != null)
            {
                filepath = objReader.ReadLine();
                if (filepath != null)
                    arrText.Add(filepath);

            }
            objReader.Close();

            //string path;
            //path = filepath;
            // Read the file and display it line by line.
            int found;
            int count = 0;
           string [] cc;
            int basic_source_attr_no = 20;
            float simi_degree;
            string textData = File.ReadAllText(@"C:\expermentaldata\s3\attributes.txt");
            int cnt = (WordCounting.CountWords1(textData));
            string[] content = File.ReadAllLines(@"C:\expermentaldata\s3\attributes.txt");
            //int cnt = content.Count();
            
            

            string[] mastercontent = File.ReadAllLines(@"C:\basic_source.txt");
           
            foreach (string con in content)
            {

                if (mastercontent.Contains(con))
                {
                    found = 1;
                    count = count + found;

                }


            }

            simi_degree = (basic_source_attr_no + cnt) / count;

            try
            {

                simi_degree = (basic_source_attr_no + cnt) / count;

            }
            finally
            {
                Console.WriteLine(" ");
            }
            Console.WriteLine("external attribute no      similar attributes    simi_degree      ");
            Console.WriteLine("---------------------------------------------------------------");

            Console.WriteLine("  {0}                             {1}                {2}        ", cnt, count, simi_degree);

            Console.ReadLine();

        }

    }

    public static class WordCounting
    {
        /// <summary>
        /// Count words with Regex.
        /// </summary>
        public static int CountWords1(string s)
        {
            MatchCollection collection = Regex.Matches(s, @"[\S]+");
            return collection.Count;
        }
    }
}



`




