Gets or sets the required alignment of this section.

Namespace: SharpAssembler.Core
Assembly: SharpAssembler Core (in SharpAssembler Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public int Alignment { get; set; }
Visual Basic
Public Property Alignment As Integer
	Get
	Set
Visual C++
public:
property int Alignment {
	int get ();
	void set (int value);
}

Field Value

The alignment of this section, as a power of two. The values 0 and 1 both indicate no alignment constraints. The default is 16.

Remarks

The effect of setting this property depends on the ObjectFile used to store this section. For example, in the BIN object file format, this property determines the padding used between the end of the previous section and the start of this one, while in the ELF32 object file format, this property's value is stored in the metadata and has no influence on the placement of the section in the file or the memory references used.

Exceptions

ExceptionCondition
System..::..ArgumentException!(MathExt.IsPowerOfTwo(value))

Contracts

Get

Ensures
MathExt.IsPowerOfTwo(Contract.Result<int>())

Set

Requires
MathExt.IsPowerOfTwo(value)

See Also