Click or drag to resize

JsonExtensionsTryGetValueT Method

Attempts to return the value of a specified JObject property converted to a specific type.

Namespace:  Newtonsoft.Json.Linq
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.14.0
Syntax
public static bool TryGetValue<T>(
	this JObject jObject,
	string propertyName,
	out T value
)

Parameters

jObject
Type: JObject
The JObject instance.
propertyName
Type: SystemString
The property name.
value
Type: T
Returns as the property value if present.

Type Parameters

T
The desired type.

Return Value

Type: Boolean
true if the property was present and returned.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type JObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also