FileType.GetEncodingFromCodePage Method

Gets the encoding that is associated with the specified code page.

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

Syntax

'Declaration
Public Shared Function GetEncodingFromCodePage ( _
    codePage As Integer _
) As Encoding
public static Encoding GetEncodingFromCodePage(
    int codePage
)
public:
static Encoding^ GetEncodingFromCodePage(
    int codePage
)
static member GetEncodingFromCodePage : 
        codePage:int -> Encoding
public static function GetEncodingFromCodePage(
    codePage : int
) : Encoding

Parameters

  • codePage
    Type: System.Int32

    The code page for which the encoding is desired.

Return Value

Type: System.Text.Encoding
The encoding of the specified code page.

Exceptions

Exception Condition
InvalidFileTypeException

Remarks

This method does not support binary because that cannot be represented by an Encoding object.

.NET Framework Security

See Also

Reference

FileType Class

Microsoft.TeamFoundation.VersionControl.Client Namespace