Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a Stream that serves to transcode data between an inner Encoding and an outer Encoding, similar to Convert(Encoding, Encoding, Byte[]).
public static System.IO.Stream CreateTranscodingStream(System.IO.Stream innerStream, System.Text.Encoding innerStreamEncoding, System.Text.Encoding outerStreamEncoding, bool leaveOpen = false);
static member CreateTranscodingStream : System.IO.Stream * System.Text.Encoding * System.Text.Encoding * bool -> System.IO.Stream
Public Shared Function CreateTranscodingStream (innerStream As Stream, innerStreamEncoding As Encoding, outerStreamEncoding As Encoding, Optional leaveOpen As Boolean = false) As Stream
The stream to wrap.
The encoding associated with innerStream
.
The encoding associated with the Stream that's returned by this method.
true
if disposing the Stream returned by this method should not dispose innerStream
.
A stream that transcodes the contents of innerStream
as outerStreamEncoding
.
The returned Stream's CanRead and CanWrite properties will reflect whether innerStream
is readable or writable. If innerStream
is full-duplex, the returned Stream will be as well. However, the returned Stream is not seekable, even if innerStream
's CanSeek property returns true
.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in