IJsonDocument.TryGetValue Method
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Overloads
| Method | Description |
|---|---|
| TryGetValue(int, ref byte[]) | Tries to get the value of the element at the specified index as a byte array. |
| TryGetValue(int, ref sbyte) | Tries to get the value of the element at the specified index as an SByte. |
| TryGetValue(int, ref byte) | Tries to get the value of the element at the specified index as a Byte. |
| TryGetValue(int, ref short) | Tries to get the value of the element at the specified index as a Int16. |
| TryGetValue(int, ref ushort) | Tries to get the value of the element at the specified index as a UInt16. |
| TryGetValue(int, ref int) | Tries to get the value of the element at the specified index as an Int32. |
| TryGetValue(int, ref uint) | Tries to get the value of the element at the specified index as a UInt32. |
| TryGetValue(int, ref long) | Tries to get the value of the element at the specified index as a Int64. |
| TryGetValue(int, ref ulong) | Tries to get the value of the element at the specified index as a UInt64. |
| TryGetValue(int, ref double) | Tries to get the value of the element at the specified index as a Double. |
| TryGetValue(int, ref float) | Tries to get the value of the element at the specified index as a Single. |
| TryGetValue(int, ref decimal) | Tries to get the value of the element at the specified index as a Decimal. |
| TryGetValue(int, ref BigInteger) | Tries to get the value of the element at the specified index as a BigInteger. |
| TryGetValue(int, ref BigNumber) | Tries to get the value of the element at the specified index as a BigNumber. |
| TryGetValue(int, ref DateTime) | Tries to get the value of the element at the specified index as a DateTime. |
| TryGetValue(int, ref DateTimeOffset) | Tries to get the value of the element at the specified index as a DateTimeOffset. |
| TryGetValue(int, ref OffsetDateTime) | Tries to get the value of the element at the specified index as an OffsetDateTime. |
| TryGetValue(int, ref OffsetDate) | Tries to get the value of the element at the specified index as an OffsetDate. |
| TryGetValue(int, ref OffsetTime) | Tries to get the value of the element at the specified index as an OffsetTime. |
| TryGetValue(int, ref LocalDate) | Tries to get the value of the element at the specified index as a LocalDate. |
| TryGetValue(int, ref Period) | Tries to get the value of the element at the specified index as a Period. |
| TryGetValue(int, ref Guid) | Tries to get the value of the element at the specified index as a Guid. |
| TryGetValue(int, ref Int128) | Tries to get the value of the element at the specified index as an Int128. |
| TryGetValue(int, ref UInt128) | Tries to get the value of the element at the specified index as a UInt128. |
| TryGetValue(int, ref Half) | Tries to get the value of the element at the specified index as a Half. |
| TryGetValue(int, ref DateOnly) | Tries to get the value of the element at the specified index as a DateOnly. |
| TryGetValue(int, ref TimeOnly) | Tries to get the value of the element at the specified index as a TimeOnly. |
TryGetValue(int, ref byte[])
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a byte array.
public abstract bool TryGetValue(int index, ref byte[] value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref byte[] |
The byte array value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref sbyte)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an SByte.
public abstract bool TryGetValue(int index, ref sbyte value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref sbyte |
The SByte value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref byte)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Byte.
public abstract bool TryGetValue(int index, ref byte value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref byte |
The Byte value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref short)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Int16.
public abstract bool TryGetValue(int index, ref short value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref short |
The Int16 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref ushort)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a UInt16.
public abstract bool TryGetValue(int index, ref ushort value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref ushort |
The UInt16 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref int)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an Int32.
public abstract bool TryGetValue(int index, ref int value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref int |
The Int32 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref uint)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a UInt32.
public abstract bool TryGetValue(int index, ref uint value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref uint |
The UInt32 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref long)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Int64.
public abstract bool TryGetValue(int index, ref long value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref long |
The Int64 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref ulong)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a UInt64.
public abstract bool TryGetValue(int index, ref ulong value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref ulong |
The UInt64 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref double)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Double.
public abstract bool TryGetValue(int index, ref double value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref double |
The Double value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref float)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Single.
public abstract bool TryGetValue(int index, ref float value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref float |
The Single value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref decimal)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Decimal.
public abstract bool TryGetValue(int index, ref decimal value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref decimal |
The Decimal value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref BigInteger)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a BigInteger.
public abstract bool TryGetValue(int index, ref BigInteger value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref BigInteger |
The BigInteger value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref BigNumber)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a BigNumber.
public abstract bool TryGetValue(int index, ref BigNumber value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref BigNumber |
The BigNumber value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref DateTime)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a DateTime.
public abstract bool TryGetValue(int index, ref DateTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref DateTime |
The DateTime value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref DateTimeOffset)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a DateTimeOffset.
public abstract bool TryGetValue(int index, ref DateTimeOffset value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref DateTimeOffset |
The DateTimeOffset value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref OffsetDateTime)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an OffsetDateTime.
public abstract bool TryGetValue(int index, ref OffsetDateTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref OffsetDateTime |
The OffsetDateTime value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref OffsetDate)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an OffsetDate.
public abstract bool TryGetValue(int index, ref OffsetDate value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref OffsetDate |
The OffsetDate value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref OffsetTime)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an OffsetTime.
public abstract bool TryGetValue(int index, ref OffsetTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref OffsetTime |
The OffsetTime value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref LocalDate)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a LocalDate.
public abstract bool TryGetValue(int index, ref LocalDate value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref LocalDate |
The LocalDate value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref Period)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Period.
public abstract bool TryGetValue(int index, ref Period value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref Period |
The Period value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref Guid)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Guid.
public abstract bool TryGetValue(int index, ref Guid value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref Guid |
The Guid value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryGetValue(int, ref Int128)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as an Int128.
public abstract bool TryGetValue(int index, ref Int128 value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref Int128 |
The Int128 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, ref UInt128)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a UInt128.
public abstract bool TryGetValue(int index, ref UInt128 value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref UInt128 |
The UInt128 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, ref Half)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a Half.
public abstract bool TryGetValue(int index, ref Half value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref Half |
The Half value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, ref DateOnly)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a DateOnly.
public abstract bool TryGetValue(int index, ref DateOnly value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref DateOnly |
The DateOnly value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, ref TimeOnly)
Source: IJsonDocument.cs
Tries to get the value of the element at the specified index as a TimeOnly.
public abstract bool TryGetValue(int index, ref TimeOnly value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
ref TimeOnly |
The TimeOnly value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue