FieldAccessorSetStaticValueTField Method

Sets the strongly typed value of a static field. If the type of the field is not known at compile time the non-generic Set method can be used.

Definition

Namespace: KGySoft.Reflection
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public void SetStaticValue<TField>(
	TField value
)

Parameters

value  TField
The value to set.

Type Parameters

TField
The type of the field.

Exceptions

InvalidOperationExceptionThis FieldAccessor represents a constant, an instance field or a field of an open generic type.
ArgumentExceptionTField is invalid.
NotSupportedExceptionOn .NET Framework the code is executed in a partially trusted domain with insufficient permissions.

See Also