System::Collections::Generic::IKVCollection 类

IKVCollection class

包含字典式容器的键或值的容器接口。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

template<typename T>class IKVCollection : public System::Collections::Generic::IList<T>
参数描述
TKeyValuePair 类型。

方法

方法描述
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移除指定位置的项。

另见