浏览:180 2008-05-21 12:16 来自 上商      :

在使用下面的自定义类的实例时中,如何获取be.Id的PropertyAttribute??   

确切的说,我想通过be.Id获得下面的"BUG_ID" ,也就是PropertyAttribute.Column

BugETT be = new BugETT();

    be.Id

 /////////////////////////////////////////////

    [ActiveRecord("TB_BUG")]
    public class BugETT
    {
        
        private Int32 m_Id;
        

        public BugETT(){}


        [Property("BUG_ID")]
        public Int32 Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

}

收藏 楼主
  4个月前  上商      :
(TypeDescriptor.GetProperties(be)["Id"].Attributes[typeof(PropertyAttribute)]
as PropertyAttribute).Column 2008/5/21 13:35:15 回答者:Colin Han
1楼 回到顶楼 

注册用户登录后才能回复,登录注册
> 返回“Castle开源框架”


其他话题

相关内容

相关链接

1 26767