Share via


ValueSet.Insert(String, Object) 方法

定義

將專案加入至值集。

public:
 virtual bool Insert(Platform::String ^ key, Platform::Object ^ value) = IMap<Platform::String ^, Platform::Object ^>::Insert;
bool Insert(winrt::hstring const& key, IInspectable const& value);
public bool Insert(string key, object value);
function insert(key, value)
Public Function Insert (key As String, value As Object) As Boolean

參數

key
String

Platform::String

winrt::hstring

要插入的索引鍵。

value
Object

Platform::Object

IInspectable

要插入的值。

傳回

Boolean

bool

如果方法取代了索引鍵已經存在的值,則為 True;如果這是新的索引鍵,則為 false。

實作

備註

此類別中的某些功能僅限於特定開發語言。 父主題 ValueSet類別會指出哪些成員可存取特定語言。 如需與此成員類似的功能,請參閱 新增 (String,Object)

適用於

另請參閱