Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using the below code to compare two files and finally write the file . The error is like below
;-
the best overloaded method match for file.writealllines(string,string[]) has some invalid arguments.

my code is :-


var result = File.ReadAllLines(savePath).Except(File.ReadAllLines(todaytraffic));

File.WriteAllLines(todaytraffic, result);
Posted
Comments
Sergey Alexandrovich Kryukov 12-Feb-14 17:08pm    
Why writing such a weird thing? What are you trying to achieve. Do you really understand how Enumerable.Except works?
What do you really have in your files "todaytraffic" and "savePath"?
What is the problem?
—SA
DEbopm 12-Feb-14 17:46pm    
savepath is a text file and also todaytraffic is a text file. I want to compare the files and catch the differences between these two files.
Matt T Heffron 12-Feb-14 20:52pm    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900