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
声明
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
- 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 target file.
- targetCodePage
 Type: System.Int32
 The target 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.