Sdílet prostřednictvím


JsonObject.SetNamedValue(String, IJsonValue) Method

Definition

Sets the value of the first JsonValue object with the specified name to the specified value. If no such object is found, a new name and JsonValue pair is inserted into the JSON object.

public:
 virtual void SetNamedValue(Platform::String ^ name, IJsonValue ^ value) = SetNamedValue;
void SetNamedValue(winrt::hstring const& name, IJsonValue const& value);
public void SetNamedValue(string name, IJsonValue value);
function setNamedValue(name, value)
Public Sub SetNamedValue (name As String, value As IJsonValue)

Parameters

name
String

Platform::String

winrt::hstring

The specified name.

value
IJsonValue

The specified value.

Remarks

If value is null, then any existing value with the specified name is removed.

Applies to