在业务逻辑层中,看到如下的代码不知道是什么意思,我把代码注释掉也能运行。
[System.ComponentModel.DataObject]
[System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select, true)]中括号是什么意思,中括号中的代码又是什么意思?
谢谢```

解决方案 »

  1.   

    使用Attibute,实现所谓“声明式编程”
      

  2.   

    System.ComponentModel.DataObject表示这个类是“数据对象”组件
      

  3.   

    System.ComponentModel.DataObject表示这个类是“数据对象”组件
    并拥有“数据对象”具有的一切特性
      

  4.   

    加上这句后,在ObjectDetaSource中的Selcet标签中会默认处于选中状态。