PostSharp SDK6.6//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
System.Object
  PostSharp.Sdk.CodeModel.Element
    PostSharp.Sdk.CodeModel.Declaration
      PostSharp.Sdk.CodeModel.DataSectionDeclaration

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

The DataSectionDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodDataSectionDeclaration
Initializes a new DataSectionDeclaration.
Properties
  NameDescription
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.
Methods
  NameDescription
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.)
Remarks

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