gxc

永远不要认为有什么事情是理所当然的!

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2006年3月29日

摘要: usingSystem;usingSystem.Reflection;namespaceCustomAttrCS{publicenumAnimal{Dog=1,Cat,Bird,Pig}[AttributeUsage(AttributeTargets.Class,Inherited=false,AllowMultiple=true)]publicclassAnimalTypeAttribute:A... 阅读全文
posted @ 2006-03-29 15:08 gxc 阅读(184) 评论(0) 推荐(0) 编辑

摘要: using System;using System.Reflection;namespace CustomAttrCS{ public enum Animal{Dog = 1,Cat,Bird,} public class AnimalTypeAttribute : Attribute { protected Animal thePet; public... 阅读全文
posted @ 2006-03-29 14:29 gxc 阅读(176) 评论(0) 推荐(0) 编辑