System.Reflection.GenericParameterAttributes.cs

ylbtech-System.Reflection.GenericParameterAttributes.cs
1.返回顶部
1、
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll
#endregion

namespace System.Reflection
{
    //
    // 摘要:
    //     描述对泛型类型或方法的泛型类型参数的约束。
    [Flags]
    public enum GenericParameterAttributes
    {
        //
        // 摘要:
        //     无特殊标志。
        None = 0,
        //
        // 摘要:
        //     该泛型类型参数是协变。 协变类型参数可作为方法的结果类型、只读字段的类型、声明的基类型或实现的接口出现。
        Covariant = 1,
        //
        // 摘要:
        //     该泛型类型参数是逆变。 逆变类型参数可作为方法签名中的参数类型出现。
        Contravariant = 2,
        //
        // 摘要:
        //     选择所有方差标志的组合。 此值是使用逻辑“OR”合并后列标志得出的结果:System.Reflection.GenericParameterAttributes.Contravariant
        //     和 System.Reflection.GenericParameterAttributes.Covariant。
        VarianceMask = 3,
        //
        // 摘要:
        //     仅当一个类型是引用类型时,才能替代泛型类型参数。
        ReferenceTypeConstraint = 4,
        //
        // 摘要:
        //     仅当一个类型是值类型且不可为 null 时,才能替代泛型类型参数。
        NotNullableValueTypeConstraint = 8,
        //
        // 摘要:
        //     仅当一个类型具有无参数的构造函数时,才能替代泛型类型参数。
        DefaultConstructorConstraint = 16,
        //
        // 摘要:
        //     选择所有特殊约束标志的组合。 此值是使用逻辑“OR”合并后列标志得出的结果:System.Reflection.GenericParameterAttributes.DefaultConstructorConstraint、System.Reflection.GenericParameterAttributes.ReferenceTypeConstraint
        //     和 System.Reflection.GenericParameterAttributes.NotNullableValueTypeConstraint。
        SpecialConstraintMask = 28
    }
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

猜你喜欢

转载自www.cnblogs.com/storebook/p/12677724.html