dotnet / dotnet/dotnet-api-docs
IsConstructedGenericType documentation fix
Open
area-System.Reflection
Pri3
untriaged
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The [docs ](https://docs.microsoft.com/en-us/dotnet/api/system.type.isconstructedgenerictype?view=netframework-4.8) say "You can create instances of a constructed generic type," but that isn't always true. Consider:
private abstract class MyClass
{
}
This returns `true`
typeof(MyClass).IsConstructedGenericType
This throws:
Activator.CreateInstance(typeof(MyClass));
Contributor guide
Assessment
This issue has not been assessed yet.