Share via


PropertySet.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。

實作

適用於