This documentation is archived and is not being maintained.

Difference::DiffFiles Method (String, Int32, String, Int32, DiffOptions)

Compares two files by using the internal diff engine, and returns the linked list of DiffSegments.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public:
static DiffSegment^ DiffFiles(
	String^ source, 
	int sourceCodePage, 
	String^ target, 
	int targetCodePage, 
	DiffOptions^ diffOpts
)

Parameters

source
Type: System::String

The local path of the source file.

sourceCodePage
Type: System::Int32

The source file encoding page.

target
Type: System::String

The local path of the destination file.

targetCodePage
Type: System::Int32

The destination file encoding page.

diffOpts
Type: Microsoft.TeamFoundation.VersionControl.Common::DiffOptions

Options for the difference operation.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Common::DiffSegment
The linked list of DiffSegments.

The sourceCodePage must equal the targetCodePage.

If the files have different code pages, the caller must convert them to a common code page.

Show: