Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple constraints example doesn't make any sense #40268

Closed
geoff-m opened this issue Mar 30, 2024 · 0 comments · Fixed by #41777
Closed

Multiple constraints example doesn't make any sense #40268

geoff-m opened this issue Mar 30, 2024 · 0 comments · Fixed by #41777
Assignees
Labels
dotnet-csharp/svc fundamentals/subsvc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@geoff-m
Copy link

geoff-m commented Mar 30, 2024

Type of issue

Code doesn't work

Description

We are given this class declaration:

class EmployeeList<T> where T : Employee, System.Collections.Generic.IList<T>, IDisposable, new()

This class declaration is, at face value, nonsense. At least I personally have a hard time grasping what could be meant by it, and there is no discussion or example involving it in the document, which contains no motivation or way to use such a class. It is not at all clear how it could even be instantiated.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/constraints-on-type-parameters#feedback

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/programming-guide/generics/constraints-on-type-parameters.md

Document Version Independent Id

22b2c77c-2721-9384-3863-046e391ea4b1

Article author

@BillWagner

Metadata

  • ID: 5712215d-b167-d9cb-bd51-80df0e300d50
  • Service: dotnet-csharp
  • Sub-service: fundamentals

Associated WorkItem - 289448

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Mar 30, 2024
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Apr 1, 2024
@BillWagner BillWagner self-assigned this Jul 26, 2024
@BillWagner BillWagner moved this from 🔖 Ready to 👀 In review in dotnet/docs July 2024 Sprint Jul 26, 2024
@BillWagner BillWagner added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Jul 26, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jul 27, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in dotnet/docs July 2024 Sprint Jul 29, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-csharp/svc fundamentals/subsvc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants