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()); }