Skip to content

T_Cyjb_Collections_ObjectModel_SetBase_1

CYJB edited this page Mar 20, 2024 · 13 revisions

SetBase(T) 类

为泛型集合提供基类。

继承层次

System.Object
  Cyjb.Collections.ObjectModel.CollectionBase(T)
    Cyjb.Collections.ObjectModel.SetBase(T)
      Cyjb.Collections.CharSet
Namespace: Cyjb.Collections.ObjectModel
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public abstract class SetBase<T> : CollectionBase<T>, 
	ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IReadOnlySet<T>, 
	IReadOnlyCollection<T>

类型参数

 

T
集合中的元素类型。
  The SetBase(T) type exposes the following members.

构造函数

 

名称 说明
受保护的方法 SetBase(T) 初始化 SetBase(T) 类的新实例。
  Back to Top

属性

 

名称 说明
公共属性 Count 获取当前集合包含的元素数。 (继承自 CollectionBase(T)。)
  Back to Top

方法

 

名称 说明
公共方法 Add 向当前集合内添加元素,并返回一个指示是否已成功添加元素的值。
受保护的方法 AddItem 将指定对象添加到当前集合中。 (重写 CollectionBase(T).AddItem(T).)
公共方法 Clear 从当前集合中移除所有元素。 (继承自 CollectionBase(T)。)
公共方法 Contains 确定当前集合是否包含指定对象。 (继承自 CollectionBase(T)。)
公共方法 CopyTo 从特定的 Array 索引处开始,将当前集合 的元素复制到一个 Array 中。 (继承自 CollectionBase(T)。)
受保护的方法 CountElements 确定当前集与指定集合相比,相同的和未包含的元素数目。
公共方法 Equals Determines whether the specified object is equal to the current object. (继承自 Object。)
公共方法 ExceptWith 从当前集合内移除指定集合中的所有元素。
受保护的方法 Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。)
公共方法 GetEnumerator 返回一个循环访问集合的枚举器。 (继承自 CollectionBase(T)。)
公共方法 GetHashCode Serves as the default hash function. (继承自 Object。)
受保护的方法 GetSyncRoot 获取一个可用于同步对当前集合的访问的对象。 (继承自 CollectionBase(T)。)
公共方法 GetType Gets the Type of the current instance. (继承自 Object。)
公共方法 IntersectWith 修改当前集合,使当前集合仅包含指定集合中也存在的元素。
公共方法 IsProperSubsetOf 确定当前集合是否为指定集合的真子集合。
公共方法 IsProperSupersetOf 确定当前集合是否为指定集合的真超集合。
公共方法 IsSubsetOf 确定当前集合是否为指定集合的子集合。
公共方法 IsSupersetOf 确定当前集合是否为指定集合的超集合。
受保护的方法 MemberwiseClone Creates a shallow copy of the current Object. (继承自 Object。)
公共方法 Overlaps 确定当前集合是否与指定的集合重叠。
公共方法 Remove 从当前集合中移除特定对象的第一个匹配项。 (继承自 CollectionBase(T)。)
公共方法 SetEquals 确定当前集合与指定的集合中是否包含相同的元素。
公共方法 SymmetricExceptWith 修改当前集合,使该集合仅包含当前集合或指定集合中存在的元素(但不可包含两者共有的元素)。
公共方法 ToString Returns a string that represents the current object. (继承自 Object。)
公共方法 UnionWith 修改当前集合,使该集合包含当前集合和指定集合中同时存在的所有元素。
  Back to Top

扩展方法

 

名称 说明
公共扩展器方法 AddRange(T) 将指定集合的元素添加到当前集合中。 (由 CollectionUtil 定义。)
公共扩展器方法 AsReadOnly(T)() 已重载。 返回当前集合的只读包装。 (由 SetUtil 定义。)
公共扩展器方法 AsReadOnly(T)() 已重载。 返回当前集合的只读包装。 (由 CollectionUtil 定义。)
公共扩展器方法 IsDistinct(T) 判断序列中是否不包含重复元素。 (由 EnumerableUtil 定义。)
  Back to Top

参见

Reference

Cyjb.Collections.ObjectModel 命名空间

Clone this wiki locally