docs
docs copied to clipboard
where T : new()
Now that a struct can have a default constructor, can this constraint be used in combination with the "where T : struct" constraint?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 5712215d-b167-d9cb-bd51-80df0e300d50
- Version Independent ID: 22b2c77c-2721-9384-3863-046e391ea4b1
- Content: Constraints on type parameters - C# Programming Guide
- Content Source: docs/csharp/programming-guide/generics/constraints-on-type-parameters.md
- Product: dotnet-csharp
- Technology: csharp-fundamentals
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn