Share via


CurrentEncoding Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the current character encoding that the current StreamReader object is using.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Public Overridable ReadOnly Property CurrentEncoding As Encoding
public virtual Encoding CurrentEncoding { get; }
public:
virtual property Encoding^ CurrentEncoding {
    Encoding^ get ();
}
abstract CurrentEncoding : Encoding with get
override CurrentEncoding : Encoding with get
function get CurrentEncoding () : Encoding

Property Value

Type: System.Text. . :: . .Encoding
The current character encoding used by the current reader. The value can be different after the first call to any Read method of StreamReader, since encoding autodetection is not done until the first call to a Read method.

.NET Framework Security

See Also

Reference

StreamReader Class

System.IO Namespace