Edit

Share via


JsonNode.ReplaceWith<T>(T) Method

Definition

Replaces this node with a new value.

public:
generic <typename T>
 void ReplaceWith(T value);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating JsonValue instances with non-primitive types requires generating code at runtime.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")]
public void ReplaceWith<T>(T value);
public void ReplaceWith<T>(T value);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating JsonValue instances with non-primitive types requires generating code at runtime.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.")>]
member this.ReplaceWith : 'T -> unit
member this.ReplaceWith : 'T -> unit
Public Sub ReplaceWith(Of T) (value As T)

Type Parameters

T

The type of value to be replaced.

Parameters

value
T

The value that replaces this node.

Attributes

Applies to