compare two word document
-
hello guys, i need to compare two word document contents.i'm loading both of word document into richtextbox.actually both document are the version of each other.so i want to mark the changes in higher version. i can not use any tool i need to write the code for this. all suggestions are welcome. thanks
Amit Agarwal
-
hello guys, i need to compare two word document contents.i'm loading both of word document into richtextbox.actually both document are the version of each other.so i want to mark the changes in higher version. i can not use any tool i need to write the code for this. all suggestions are welcome. thanks
Amit Agarwal
I might be wrong, but try checking bytes. Get byte array for both files and check each locations.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
I might be wrong, but try checking bytes. Get byte array for both files and check each locations.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
hi, Thanks for the Reply. I tried a lot, but i'm not getting the actual logic for getting the differences between two files while i'm fetching both of them content into the richtextbox. any suggestion on this. Thanks.
Amit Agarwal
-
hi, Thanks for the Reply. I tried a lot, but i'm not getting the actual logic for getting the differences between two files while i'm fetching both of them content into the richtextbox. any suggestion on this. Thanks.
Amit Agarwal
Have you checked comparing bytes ? It worked for me here.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Have you checked comparing bytes ? It worked for me here.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
ok, that's really great. can u please available me the sample code.bieng a developer, its really bad for asking a code. but i need it.what u suggest. thanks
Amit Agarwal
-
ok, that's really great. can u please available me the sample code.bieng a developer, its really bad for asking a code. but i need it.what u suggest. thanks
Amit Agarwal
Use
File.ReadAllBytes()
to get a byte array of the file. Like this take two byte arrays represents two files. By checking the array length, you will find which is big one. If both are same length, then loop through each bytes and check with the same location in second array. Hope you can make it.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions