IsEnumeration() public static method

public static IsEnumeration ( ITypeReference value ) : bool
value ITypeReference
return bool
Beispiel #1
0
        public static string GetName(IFieldReference value)
        {
            IType fieldType     = value.FieldType;
            IType declaringType = value.DeclaringType;

            if (fieldType.Equals(declaringType))
            {
                ITypeReference typeReference = fieldType as ITypeReference;
                if (typeReference != null)
                {
                    if (Helper.IsEnumeration(typeReference))
                    {
                        return(value.Name);
                    }
                }
            }

            return(value.Name + " : " + value.FieldType.ToString());
        }