Skip to main content Skip to complementary content

Get Method

Overloads

Get<T>(String)

Retrieves a property of the abstract structure and inteprets it as an object of type T.

Get<T>(String, T)

Retrieves an element of the abstract structure and interprets it as an object of type T.

Get<T>(String)

Retrieves a property of the abstract structure and inteprets it as an object of type T.

Declaration

      T Get<T>(string propertyName)
    

Parameters

Type Name Description
System.String propertyName

Name of property

Returns

Type Description
T

Property structure deserialized as type T.

Type Parameters

Name Description
T

The expected type of the property object.

Exceptions

Type Condition
InvalidPropertyAccessException

Thrown if the property has previously been interpreted as a type incompatible to T.

Get<T>(String, T)

Retrieves an element of the abstract structure and interprets it as an object of type T.

Declaration

      T Get<T>(string propertyName, T defaultValue)
    

Parameters

Type Name Description
System.String propertyName

Name of property.

T defaultValue

Default value for property if not set in structure.

Returns

Type Description
T

Property structure deserialized as type T.

Type Parameters

Name Description
T

The expected type of the property object.

Exceptions

Type Condition
InvalidPropertyAccessException

Thrown if the property has previously been interpreted as a type incompatible to T.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!