ActivityTagsCollection.Add 方法

定义

重载

Add(KeyValuePair<String,Object>)

向集合中添加一项。

Add(String, Object)

在集合中添加一个带有所提供的键和值的标记。 此集合不允许添加两个具有相同键的标记。

Add(KeyValuePair<String,Object>)

Source:
ActivityTagsCollection.cs
Source:
ActivityTagsCollection.cs
Source:
ActivityTagsCollection.cs

向集合中添加一项。

public:
 virtual void Add(System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^> item);
public void Add (System.Collections.Generic.KeyValuePair<string,object?> item);
abstract member Add : System.Collections.Generic.KeyValuePair<string, obj> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<string, obj> -> unit
Public Sub Add (item As KeyValuePair(Of String, Object))

参数

item
KeyValuePair<String,Object>

要添加到集合中的标记的键值对。

实现

例外

item 已经存在于列表中。

itemnull

适用于

Add(String, Object)

Source:
ActivityTagsCollection.cs
Source:
ActivityTagsCollection.cs
Source:
ActivityTagsCollection.cs

在集合中添加一个带有所提供的键和值的标记。 此集合不允许添加两个具有相同键的标记。

public:
 virtual void Add(System::String ^ key, System::Object ^ value);
public void Add (string key, object? value);
abstract member Add : string * obj -> unit
override this.Add : string * obj -> unit
Public Sub Add (key As String, value As Object)

参数

key
String

标记键。

value
Object

标记值。

实现

适用于