Microsoft.CSharp.RuntimeBinder.Semantics.CType.IsTypeParameterType C# (CSharp) Méthode

IsTypeParameterType() public méthode

public IsTypeParameterType ( ) : bool
Résultat bool
        public bool IsTypeParameterType() { return this is TypeParameterType; }

Usage Example

Exemple #1
0
        // It would be nice to make this a virtual method on typeSym.
        public AggregateType GetAggTypeSym(CType typeSym)
        {
            Debug.Assert(typeSym != null);
            Debug.Assert(typeSym.IsAggregateType() ||
                         typeSym.IsTypeParameterType() ||
                         typeSym.IsArrayType() ||
                         typeSym.IsNullableType());

            switch (typeSym.GetTypeKind())
            {
            case TypeKind.TK_AggregateType:
                return(typeSym.AsAggregateType());

            case TypeKind.TK_ArrayType:
                return(GetReqPredefType(PredefinedType.PT_ARRAY));

            case TypeKind.TK_TypeParameterType:
                return(typeSym.AsTypeParameterType().GetEffectiveBaseClass());

            case TypeKind.TK_NullableType:
                return(typeSym.AsNullableType().GetAts(ErrorContext));
            }
            Debug.Assert(false, "Bad typeSym!");
            return(null);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.CType::IsTypeParameterType