Share via


Utf8JsonReader.TryGetUInt16(UInt16) Méthode

Définition

Important

Cette API n’est pas conforme CLS.

Tente d’analyser la valeur du jeton JSON actuelle de la source en tant que UInt16 et retourne une valeur qui indique si l’opération a réussi.

public:
 bool TryGetUInt16([Runtime::InteropServices::Out] System::UInt16 % value);
[System.CLSCompliant(false)]
public bool TryGetUInt16 (out ushort value);
[<System.CLSCompliant(false)>]
member this.TryGetUInt16 : uint16 -> bool
Public Function TryGetUInt16 (ByRef value As UShort) As Boolean

Paramètres

value
UInt16

Lorsque cette méthode est retournée, contient la valeur entière non signée 16 bits équivalente au nombre JSON actuel si la conversion a réussi ou 0 si la conversion a échoué.

Retours

Boolean

true si la valeur du jeton encodé en UTF-8 toute entière peut être analysée correctement pour obtenir une valeur UInt16 ; sinon, false.

Attributs

Exceptions

La valeur du jeton JSON n’est pas un Number.

S’applique à

Voir aussi