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)

Syntax

'Declaration
Public Shared Function DiffFiles ( _
    source As String, _
    sourceCodePage As Integer, _
    target As String, _
    targetCodePage As Integer, _
    diffOpts As DiffOptions _
) As DiffSegment
public static DiffSegment DiffFiles(
    string source,
    int sourceCodePage,
    string target,
    int targetCodePage,
    DiffOptions diffOpts
)
public:
static DiffSegment^ DiffFiles(
    String^ source, 
    int sourceCodePage, 
    String^ target, 
    int targetCodePage, 
    DiffOptions^ diffOpts
)
static member DiffFiles : 
        source:string * 
        sourceCodePage:int * 
        target:string * 
        targetCodePage:int * 
        diffOpts:DiffOptions -> DiffSegment
public static function DiffFiles(
    source : String, 
    sourceCodePage : int, 
    target : String, 
    targetCodePage : int, 
    diffOpts : DiffOptions
) : DiffSegment

Parameters

  • 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.

Return Value

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

Remarks

The sourceCodePage must equal the targetCodePage.

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

.NET Framework Security

See Also

Reference

Difference Class

DiffFiles Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace