IEncodingDetector.GetStreamEncoding Method
Attempts to detect the encoding associated with a stream.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Function GetStreamEncoding ( _
stream As Stream _
) As Encoding
Encoding GetStreamEncoding(
Stream stream
)
Encoding^ GetStreamEncoding(
Stream^ stream
)
abstract GetStreamEncoding :
stream:Stream -> Encoding
function GetStreamEncoding(
stream : Stream
) : Encoding
Parameters
stream
Type: StreamThe stream to read.
Return Value
Type: Encoding
The detected encoding, or nulla null reference (Nothing in Visual Basic) if one could not be determined.
Remarks
The stream is read from its current position. The encoding detector does not need to reset the stream's position.
.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.