IJsonDocument.TryGetValue Method
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Overloads
| Method | Description |
|---|---|
| TryGetValue(int, byte[]) | Tries to get the value of the element at the specified index as a byte array. |
| TryGetValue(int, sbyte) | Tries to get the value of the element at the specified index as an SByte. |
| TryGetValue(int, byte) | Tries to get the value of the element at the specified index as a Byte. |
| TryGetValue(int, short) | Tries to get the value of the element at the specified index as a Int16. |
| TryGetValue(int, ushort) | Tries to get the value of the element at the specified index as a UInt16. |
| TryGetValue(int, int) | Tries to get the value of the element at the specified index as an Int32. |
| TryGetValue(int, uint) | Tries to get the value of the element at the specified index as a UInt32. |
| TryGetValue(int, long) | Tries to get the value of the element at the specified index as a Int64. |
| TryGetValue(int, ulong) | Tries to get the value of the element at the specified index as a UInt64. |
| TryGetValue(int, double) | Tries to get the value of the element at the specified index as a Double. |
| TryGetValue(int, float) | Tries to get the value of the element at the specified index as a Single. |
| TryGetValue(int, decimal) | Tries to get the value of the element at the specified index as a Decimal. |
| TryGetValue(int, BigInteger) | Tries to get the value of the element at the specified index as a BigInteger. |
| TryGetValue(int, BigNumber) | Tries to get the value of the element at the specified index as a BigNumber. |
| TryGetValue(int, DateTime) | Tries to get the value of the element at the specified index as a DateTime. |
| TryGetValue(int, DateTimeOffset) | Tries to get the value of the element at the specified index as a DateTimeOffset. |
| TryGetValue(int, OffsetDateTime) | Tries to get the value of the element at the specified index as an OffsetDateTime. |
| TryGetValue(int, OffsetDate) | Tries to get the value of the element at the specified index as an OffsetDate. |
| TryGetValue(int, OffsetTime) | Tries to get the value of the element at the specified index as an OffsetTime. |
| TryGetValue(int, LocalDate) | Tries to get the value of the element at the specified index as a LocalDate. |
| TryGetValue(int, Period) | Tries to get the value of the element at the specified index as a Period. |
| TryGetValue(int, Guid) | Tries to get the value of the element at the specified index as a Guid. |
| TryGetValue(int, Int128) | Tries to get the value of the element at the specified index as an Int128. |
| TryGetValue(int, UInt128) | Tries to get the value of the element at the specified index as a UInt128. |
| TryGetValue(int, Half) | Tries to get the value of the element at the specified index as a Half. |
| TryGetValue(int, DateOnly) | Tries to get the value of the element at the specified index as a DateOnly. |
| TryGetValue(int, TimeOnly) | Tries to get the value of the element at the specified index as a TimeOnly. |
TryGetValue(int, 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, out byte[] value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out sbyte value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out byte value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out short value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out ushort value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out int value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out uint value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out long value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out ulong value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out double value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out float value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out decimal value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out BigInteger value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out BigNumber value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out DateTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out DateTimeOffset value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out OffsetDateTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out OffsetDate value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out OffsetTime value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out LocalDate value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out Period value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out Guid value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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, 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, out Int128 value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
Int128 |
The Int128 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, 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, out UInt128 value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
UInt128 |
The UInt128 value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, 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, out Half value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
Half |
The Half value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, 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, out DateOnly value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
DateOnly |
The DateOnly value. |
Returns
true if the value was retrieved; otherwise, false.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
TryGetValue(int, 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, out TimeOnly value)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The index of the element. |
value |
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