Hello people...
This is my first post here and i hope i get some pretty good help :)
I'm currently working on a windows form application that has a simple functionality, it should work like this:
there are two .html files. these two files are selected using a openFileDialog. there is a button called "sync" in the form,
when this button is clicked, the contents of these two .html files should be compared and sync together, in this way; if one of the files contains some text more that the other file, then it should be added to the file... same goes the other way, so it should be this way for both files. in the end, i want both files to be the same (have the same content).
i've been thinking about this and came to this idea; i should first read the html content of the first file and then store it as a variable, then do the same scenario for the second html file. so now we have to string variables holding a line of text. then these two should be compared. if they are different; both lines should be written to a new file called "file.html", so a new file should be created containg two lines from those files. if after compare the lines are same, then it should be written to file.html.
how can i do this in C#?
i'm new to C# and learning it... quite nice :) so i would appreciate if some one could help me with my issue.
Thanking you in advance
Loading
jitendra kumarPosted Feb 12, 2010, 12:39 AM
Download From http://winmerge.org/
but u have to require through coding so go through this link
http://forums.asp.net/t/1226795.aspx
Mahesh ChandPosted Feb 11, 2010, 7:50 PM
Here is one article on how to compare two files:
http://support.microsoft.com/kb/320348
Here is an article on how to merge two files:
Merget two files in C#
Hope these articles will put you in the right direction.