Queue 成员

表示对象的先进先出集合。

下表列出了由 Queue 类型公开的成员。

公共构造函数

  名称 说明
Public method Supported by the .NET Compact Framework Queue 已重载。初始化 Queue 类的新实例。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework Count 获取 Queue 中包含的元素数。
Public property Supported by the .NET Compact Framework IsSynchronized 获取一个值,该值指示是否同步对 Queue 的访问(线程安全)。
Public property Supported by the .NET Compact Framework SyncRoot 获取可用于同步 Queue 访问的对象。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Clear Queue 中移除所有对象。
Public method Supported by the .NET Compact Framework Clone 创建 Queue 的浅表副本。
Public method Supported by the .NET Compact Framework Contains 确定某元素是否在 Queue 中。
Public method Supported by the .NET Compact Framework CopyTo 从指定数组索引开始将 Queue 元素复制到现有一维 Array 中。
Public method Supported by the .NET Compact Framework Dequeue 移除并返回位于 Queue 开始处的对象。
Public method Supported by the .NET Compact Framework Enqueue 将对象添加到 Queue 的结尾处。
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetEnumerator 返回循环访问 Queue 的枚举数。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Peek 返回位于 Queue 开始处的对象但不将其移除。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Static Synchronized 返回同步的(线程安全)Queue 包装。
Public method Supported by the .NET Compact Framework ToArray Queue 元素复制到新数组。
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework TrimToSize 将容量设置为 Queue 中元素的实际数目。

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

请参见

参考

Queue 类
System.Collections 命名空间
System.Collections.Generic.Queue