PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Data­Section­Declaration Class

DataSectionDeclaration Class

Represents a data section, where initial values of fields are stored.
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: (
public sealed class DataSectionDeclaration : Declaration, 

The DataSectionDeclaration type exposes the following members.

Public methodDataSectionDeclaration
Initializes a new DataSectionDeclaration.
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyName
Gets or sets the name of the data section.
Public propertyOrdinal
Gets or set the emit order of the data section in the module.
Public propertySectionKind
Gets the kind of section of the PE file in which the DataSectionDeclaration should be stored.
Public propertyValue
Gets or sets the raw data.
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of the current Element and all its children.
(Inherited from Element.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

Data declarations are owned by the module (ModuleDeclaration) on the Data property.

Fields (FieldDefDeclaration) with fixed binary layout may be initialized to a value stored in a DataSectionDeclaration by setting the InitialValue property.

See Also