|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionHave you ever wanted or needed a diff and/or patch utility optimized for the .NET platform. This article provides an implementation of a diff/patch utility written in C#. It operates over generics, so you can provide lists of anything to be diffed or patched, The implementation also provides a command line interface with output similar to the UNIX diff command. Example of using the Diff class to diff 2 text files
This performs the diff. The final parameter indicates whether the actual differences should be included in the edit script when the diff is performed. To write the differences between file A and file B to the console, diff.Write(Console.Out); Patching an input or Converting A into BTo Patch a file by applying the diff edit script changes to an input, use the Patch Class
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||