public static bool IsEditable(this PropertyInfo propertyInfo) { return(EditableAttribute.IsDefined(propertyInfo, typeof(EditableAttribute)) ? (EditableAttribute.GetCustomAttribute(propertyInfo, typeof(EditableAttribute)) as EditableAttribute).AllowEdit : true); }