Compare DIFF Files in C# .NET

.NET documents comparison API to detect the changes between two versions of DIFF files and export to a final document with a detailed summary of the differences between the compared documents.

Download Free Trial

About GroupDocs.Comparison for .NET API

GroupDocs.Comparison for .NET is a native .NET API for comparing multiple images and documents of the same format. It helps you detect the differences within paragraphs, words, characters, shapes, even the text styles of the compared documents, merge the changes and export to a final document. It supports comparing and merging PDF, Word documents, Excel spreadsheets, PowerPoint presentations, Visio diagrams, Outlook emails, HTML, drawings and image file formats without using any external library.

Steps for Comparing DIFF Files in C#

GroupDocs.Comparison makes it easy for .NET developers to compare & merge multiple DIFF files in their applications by implementing a few easy steps.

  • Instantiate Comparer object with source document path or stream.
  • Call Add method and specify target document path or stream. Repeat this step for every target document.
  • Call Compare method.

System Requirements

GroupDocs.Comparison for .NET APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environments: Microsoft Visual Studio, Xamarin, MonoDevelop
  • Frameworks: .NET Framework, .NET Standard, .NET Core, Mono
  • Get the latest version of GroupDocs.Comparison for .NET downloaded from NuGet

// Compare multiple documents from local disk

using (Comparer comparer = new Comparer("source.diff"))
    comparer.Compare("result.diff"); // Create result file with the specified name

// Compare multiple documents from stream

using (Comparer comparer = new Comparer(File.OpenRead("source.diff")))
    comparer.Compare(File.Create("result.diff")); // Create result file with the specified name

Live Demos of Comparing DIFF Files

Detect differences between DIFF files right now by visiting GroupDocs.Comparison Live Demos website.
The live demo has the following benefits

No need to download API

No need to write any code

Just upload the source file

Get download link to save the file

About DIFF File Format

A DIFF file is a single file showing the differences between one or more text or source files. It is created by Mercurial, a control management tool for developers to obtain differences between files and apply the patches. Through DIFF files, developers share their changes with other developers so that the changes can be updated to generate a newer version of the text files. DIFF files can be opened in Mercurial.

Read More About DIFF File Format

Comparing Other File Formats

Multi format documents and images comparison API for .NET. Analyse the differences between documents of the same format without using any external tool.

Compare PDF Files

(Adobe Portable Document Format)

Compare DOC Files

(Microsoft Word Document)

Compare DOCM Files

(Microsoft Word Macro-Enabled Document)

Compare DOCX Files

(Microsoft Word Open XML Document)

Compare DOT Files

(Microsoft Word Document Template)

Compare DOTM Files

(Microsoft Word Macro-Enabled Template)

Compare DOTX Files

(Word Open XML Document Template)

Compare RTF Files

(Rich Text File Format)

Compare TXT Files

(Plain Text File Format)

Compare XLS Files

(Microsoft Excel Binary File Format)

Compare XLSX Files

(Microsoft Excel Open XML Spreadsheet)

Compare XLTM Files

(Microsoft Excel macro-enabled template)

Compare XLSM Files

(Microsoft Excel Macro-Enabled Spreadsheet)

Compare XLSB Files

(Microsoft Excel Binary Spreadsheet File)

Compare CSV Files

(Comma Separated Values File)

Compare PPT Files

(PowerPoint Presentation)

Compare PPS Files

(Microsoft PowerPoint Slide Show)

Compare PPTX Files

(PowerPoint Open XML Presentation)

Compare PPSX Files

(PowerPoint Open XML Slide Show)

Compare POT Files

(Microsoft PowerPoint template)

Compare POTX Files

(Microsoft PowerPoint Open XML Template)

Compare ODS Files

(Open Document Spreadsheet)

Compare ODP Files

(OpenDocument Presentation File Format)

Compare OTP Files

(Origin Graph Template)

Compare ODT Files

(Open Document Text)

Compare OTT Files

(Open Document Template)

Compare VST Files

(Microsoft Visio 2003-2010 XML Drawing)

Compare JPEG Files

(JPEG Image)

Compare PNG Files

(Portable Network Graphic)

Compare GIF Files

(Graphical Interchange Format File)

Compare BMP Files

(Bitmap File Format)

Compare HTML Files

(Hyper Text Markup Language)

Compare MHTML Files

(MIME Encapsulation of Aggregate HTML)

Compare MSG Files

(Microsoft Outlook E-mail Message)

Compare EML Files

(E-mail Message)

Compare EMLX Files

(Apple Mail E-mail File)

Compare ONE Files

(Microsoft OneNote)

Compare VSD Files

(Microsoft Visio 2003-2010 Drawing)

Compare VSDX Files

(Microsoft Visio Drawing)

Compare VSS Files

(Microsoft Visio 2003-2010 Stencil)

Compare VST Files

(Microsoft Visio 2003-2010 Template)

Compare VDX Files

(Microsoft Visio 2003-2010 XML Drawing)

Compare CS Files

(CSharp Language)

Compare Java Files

(Java Language)

Compare CPP Files

(C++ Language)

Compare JS Files

(JavaScript Language)

Compare PY Files

(Python Language)

Compare RB Files

(Ruby Language)

GroupDocs.Comparison offers document viewing APIs for other popular development environments

Back to top