DataPackagePropertySet.Insert(String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a property to the DataPackagePropertySet 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
Parameters
- key
-
String
Platform::String
winrt::hstring
The key to insert.
- value
-
Object
Platform::Object
IInspectable
The value to insert.
Returns
bool
True if the method replaced a value that already existed for the key; false if this is a new key.
Implements
Remarks
Use this method if your app needs to add a custom property to the DataPackagePropertySet object. A custom property is any property that you can't define by using an existing property of the object. For example, title is a property that the object supports directly, but if you wanted a subtitle property, you would need to use Insert to add it.
For more info, see IMapView(String, Object).