dotnet / dotnet/dotnet-api-docs

StreamWriter(Stream, Encoding, Int32, Boolean) does not throw for null Encoding on all runtimes

Open
#10,273 2 comments 0 reactions 0 assignees View on GitHub
area-System.IO Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Outdated article

### Description

`StreamWriter(Stream, Encoding, Int32, Boolean)` does not throw for `null` `Encoding` on .NET 6.0, .NET 8.0 and .NET 9.0-preview.7.

It seems to only throw on .NET Framework.

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.io.streamwriter.-ctor?view=net-9.0#system-io-streamwriter-ctor(system-io-stream-system-text-encoding-system-int32-system-boolean)

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.IO/StreamWriter.xml

### Document Version Independent Id

ba32d206-d8f5-fd4d-939b-16d19e9b10ac

### Article author

@dotnet-bot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.