PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Field­Def­Declaration Class / Field­Def­Declaration Properties / Field­Def­Declaration.​Initial­Value Property

FieldDefDeclaration.InitialValue Property

Gets or sets the DataSectionDeclaration used to initialize the field.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: (
public DataSectionDeclaration InitialValue { get; set; }

Property Value

Type: DataSectionDeclaration
A DataSectionDeclaration, or null if the field should be initialized with its default (zero) value.
This field should be set if and only if the field Attributes includes HasFieldRVA. Some rules apply to initialized fields. They are not enforced by the Code Object Model.
See Also