摘要:
usingSystem;usingSystem.Reflection;namespaceCustomAttrCS{publicenumAnimal{Dog=1,Cat,Bird,Pig}[AttributeUsage(AttributeTargets.Class,Inherited=false,AllowMultiple=true)]publicclassAnimalTypeAttribute:A... 阅读全文
摘要:
using System;using System.Reflection;namespace CustomAttrCS{ public enum Animal{Dog = 1,Cat,Bird,} public class AnimalTypeAttribute : Attribute { protected Animal thePet; public... 阅读全文