[FxCop.设计规则]7. 集合类应该实现泛型接口[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 cajon 的 blog

  • system.collections.generic.icollection<t>

  • system.collections.generic.ilist<t>

  • when to exclude messages

    it is safe to exclude a message from this rule; however, the collection will have a more limited use.

    example code

    the following example shows a collection, integercollection, that violates the rule. in genericintegercollection, the collection is modified to satisfy the rule by implementing system.collections.generic.ienumerable<t>. finally, the collection is used to populate a strongly typed stack.

    [c#]

    using system;

    using system.collections;

    本文关键:[FxCop.设计规则]7. 集合类应该实现泛型接口
      相关方案
    Google
     

    本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

    go top