此 API 支持 .NET Framework 基础结构,不适合在代码中直接使用。
返回派生自或实现指定基类型的被引用的程序集集合中的所有类型。
命名空间:  Microsoft.Windows.Design
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Public Function GetTypes ( _
    baseType As Type _
) As IEnumerable(Of Type)
public IEnumerable<Type> GetTypes(
    Type baseType
)
public:
IEnumerable<Type^>^ GetTypes(
    Type^ baseType
)
member GetTypes : 
        baseType:Type -> IEnumerable<Type> 
public function GetTypes(
    baseType : Type
) : IEnumerable<Type>
参数
- baseType
 类型:System.Type
 所有返回的类型应派生自的基类型。如果 baseType 是一个接口,则所有返回的类型将实现该接口。
返回值
类型:System.Collections.Generic.IEnumerable<Type>
类型的枚举。如果没有匹配的成员,则返回空枚举。
异常
| 异常 | 条件 | 
|---|---|
| ArgumentNullException | baseType 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 | 
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。