Editar

Partilhar via


JsonElement.GetBoolean Method

Definition

Gets the value of the element as a Boolean.

public:
 bool GetBoolean();
public bool GetBoolean ();
member this.GetBoolean : unit -> bool
Public Function GetBoolean () As Boolean

Returns

The value of the element as a Boolean.

Exceptions

This value's ValueKind is neither True nor False.

The parent JsonDocument has been disposed.

Remarks

This method does not parse the contents of a JSON string value.

Applies to