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

isClassType() public méthode

public isClassType ( ) : bool
Résultat bool
        public bool isClassType()
        {
            return (IsAggregateType() && getAggregate().IsClass());
        }
        public AggregateType underlyingEnumType()

Usage Example

        public bool IsBaseClass(CType pDerived, CType pBase)
        {
            Debug.Assert(pDerived != null);
            Debug.Assert(pBase != null);
            // A base class has got to be a class. The derived type might be a struct.

            if (!pBase.isClassType())
            {
                return(false);
            }
            if (pDerived.IsNullableType())
            {
                pDerived = pDerived.AsNullableType().GetAts(ErrorContext);
                if (pDerived == null)
                {
                    return(false);
                }
            }

            if (!pDerived.IsAggregateType())
            {
                return(false);
            }

            AggregateType atsDer  = pDerived.AsAggregateType();
            AggregateType atsBase = pBase.AsAggregateType();
            AggregateType atsCur  = atsDer.GetBaseClass();

            while (atsCur != null)
            {
                if (atsCur == atsBase)
                {
                    return(true);
                }
                atsCur = atsCur.GetBaseClass();
            }
            return(false);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.CType::isClassType