Skip to content

Conversation

Brianmanden
Copy link
Contributor

As clearly stated in the same article and the official documentation an abstract class can not be instantiated.

"The TextWriter class is an abstract class. Therefore, you do not instantiate it in your code."
Source: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter?view=net-8.0#examples

"Abstract classes have the following features:
An abstract class cannot be instantiated.
"
Source: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/abstract#example-1

Summary

Describe your changes here.
Correcting misunderstanding about instantiating an abstract class.

Fixes #Issue_Number (if available)

FIX Misunderstanding about instatiating an abstract class.

As clearly stated in the same article and the official documentation an abstract class can not be instantiated.

"The TextWriter class is an abstract class. Therefore, you do not instantiate it in your code."
Source: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter?view=net-8.0#examples

"Abstract classes have the following features:
An abstract class cannot be instantiated."
Source: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/abstract#example-1
@Brianmanden Brianmanden requested a review from a team as a code owner December 13, 2023 01:50
@ghost ghost added community-contribution Indicates that the PR has been added by a community member area-System.IO labels Dec 13, 2023
@ghost
Copy link

ghost commented Dec 13, 2023

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

As clearly stated in the same article and the official documentation an abstract class can not be instantiated.

"The TextWriter class is an abstract class. Therefore, you do not instantiate it in your code."
Source: https://learn.microsoft.com/en-us/dotnet/api/system.io.textwriter?view=net-8.0#examples

"Abstract classes have the following features:
An abstract class cannot be instantiated.
"
Source: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/abstract#example-1

Summary

Describe your changes here.
Correcting misunderstanding about instantiating an abstract class.

Fixes #Issue_Number (if available)

Author: Brianmanden
Assignees: -
Labels:

area-System.IO, community-contribution

Milestone: -

Copy link

Learn Build status updates of commit 8c1d2f1:

✅ Validation status: passed

File Status Preview URL Details
xml/System.IO/TextWriter.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @Brianmanden !

@adamsitnik adamsitnik merged commit c13606c into dotnet:main Dec 13, 2023
@Brianmanden Brianmanden deleted the patch-1 branch December 13, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants