JsonElement.Clone 方法

定义

获取可在原始 JsonDocument生存期内安全地存储的 JsonElement。

public:
 System::Text::Json::JsonElement Clone();
public System.Text.Json.JsonElement Clone();
member this.Clone : unit -> System.Text.Json.JsonElement
Public Function Clone () As JsonElement

返回

可在原始 JsonDocument生存期内安全地存储的 JsonElement。

注解

如果这是JsonElement上一次调用Clone的输出或包含在以前调用Clone的输出中的JsonElement值,则此方法不会导致额外的内存分配。

适用于