如何检查 .NET Core 中的类型是否抽象?

How to check if a type is abstract in .NET Core?

此代码在 .NET(4.6 及更早版本)中运行良好

var types = typeof(SomeType).GetTypeInfo().Assembly.GetTypes()
from type in types
where !type.IsAbstract

但在 .NET Core (DNX Core 5.0) 中它产生编译错误:

Error CS1061 'Type' does not contain a definition for 'IsAbstract' and no extension method 'IsAbstract' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

那么我如何检查 DNX Core 5.0 中的类型是否抽象,就像我在 .NET Framework 4.6 中那样?

我将其中一条评论作为答案发布,因为这是我要的:

type.GetTypeInfo().IsAbstract