INameObjectCollection 接口

定义

定义一组关联的字符串键和对象值,可以通过键或索引访问。

public interface class INameObjectCollection : System::Collections::ICollection
public interface INameObjectCollection : System.Collections.ICollection
type INameObjectCollection = interface
    interface ICollection
    interface IEnumerable
Public Interface INameObjectCollection
Implements ICollection
实现

方法

名称 说明
Add(String, Object)

将指定键和值的条目添加到集合中。

Get(Int32)

从实例中获取指定条目的值。

Get(String)

从实例中获取第一个指定键项的值。

Remove(String)

从实例中移除指定密钥的条目。

RemoveAt(Int32)

移除实例指定索引处的条目。

Set(Int32, Object)

在实例指定的索引处设置条目的值。

Set(String, Object)

如果找到,设置实例中第一个指定键项的值;否则,会在NameObjectCollection实例中添加一个具有指定键和值的条目。

适用于