PropertyAccessorGet(Object) Method

Gets the value of the property with no index parameters. For static properties the instance parameter is omitted (can be ).
See the Remarks section of the Get(Object, Object) overload for details.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public Object? Get(
	Object? instance
)

Parameters

instance  Object
The instance that the property belongs to. Can be for static properties.

Return Value

Object
The value of the property.

Exceptions

ArgumentNullExceptionThis PropertyAccessor represents an instance property and instance is .
ArgumentExceptionThe type of instance is invalid.
-or-
The property expects index parameters.
InvalidOperationExceptionThe PropertyAccessor represents a property of an open generic type.
NotSupportedExceptionThis PropertyAccessor represents a write-only property.
-or-
On .NET Framework the code is executed in a partially trusted domain with insufficient permissions.
PlatformNotSupportedExceptionYou use the .NET Standard 2.0 build of KGySoft.CoreLibraries and this PropertyAccessor represents a ref property.

See Also