ObjectInitialization Enumeration

Represents a strategy for initializing types when generating random objects.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.5.0
C#
public enum ObjectInitialization

Members

PublicFieldsAndProperties0 When initializing a new random object the public fields and public read-write properties are set (including non-public setters).
PublicProperties1 When initializing a new random object the public read-write properties (including non-public setters) are set.
Fields2 When initializing a new random object fields are set (including non-public and read-only ones). It has a high chance that the object will contain inconsistent data.

Extension Methods

AllFlagsDefined Gets whether every single bit value in flags are defined in the enum type of flags, or when flags is zero, it is checked whether zero is defined in the enum type of flags.
(Defined by EnumExtensions)
IsSingleFlag Gets whether only a single bit is set in value.
(Defined by EnumExtensions)

See Also