现在的位置: 首页 > 综合 > 正文

.Net 集合类

2011年06月07日 ⁄ 综合 ⁄ 共 3961字 ⁄ 字号 评论关闭

.Net 类库里没有集合类的吗?

自己写了个,大家提提意见~~

using System;

using System.Collections;


namespace CN.Teddy.Util.Collections

{

    
/// <summary>

    
/// ISimpleSet 的摘要说明。

    
/// </summary>


    public interface ISimpleSet : ICollection, ICloneable

    
{

        
bool Contains(object obj);


        
bool BelongTo(SimpleSet set2);


        
void Add(object obj);


        
void Remove(object obj);


        
void Clear();


        SimpleSet Intersect(SimpleSet set2);


        SimpleSet Union(SimpleSet set2);


        SimpleSet Minus(SimpleSet set2);

    }


}


using System;

using System.Collections;


namespace CN.Teddy.Util.Collections

{

    
/// <summary>

    
/// SimpleSet 的摘要说明。

    
/// </summary>


    public class SimpleSet : ISimpleSet

    
{

        
Private members


        
Public Members


        
Constructors


        
ICollection 成员


        
IEnumerable 成员


        
ISimpleSet 成员

抱歉!评论已关闭.