System::Collections::Generic::IKVCollection 类
IKVCollection class
包含字典式容器的键或值的容器接口。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。
template<typename T>class IKVCollection : public System::Collections::Generic::IList<T>
| 参数 | 描述 |
|---|---|
| T | KeyValuePair 类型。 |
方法
| 方法 | 描述 |
|---|---|
| Add(const T&) override | 向容器添加项。 |
| Clear() override | 删除容器中的所有元素。 |
| Contains(const T&) const override | 检查容器中是否存在该项。 |
| virtual get_Count() const | 获取容器中元素的数量。 |
| get_IsReadOnly() const override | 检查容器是否只读。 |
| virtual GetEnumerator() | RTTI 信息。 |
| virtual idx_get(int) const | 获取函数。 |
| idx_set(int, T) override | 设置函数。 |
| IndexOf(const T&) const override | 获取容器中项的索引。 |
| Insert(int, const T&) override | 在指定位置插入项。 |
| Remove(const T&) override | 从容器中移除项。 |
| RemoveAt(int) override | 移除指定位置的项。 |
另见
- Class IList
- Namespace System::Collections::Generic
- Library Aspose.Font for C++