Creates a new Section and adds it to the ObjectFile.

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

Syntax

C#
public virtual Section AddNewSection(
	string identifier,
	SectionType type
)
Visual Basic
Public Overridable Function AddNewSection ( _
	identifier As String, _
	type As SectionType _
) As Section
Visual C++
public:
virtual Section^ AddNewSection(
	String^ identifier, 
	SectionType type
)

Parameters

identifier
Type: System..::..String
The identifier of the section.
type
Type: SharpAssembler.Core..::..SectionType
The type of section to create.

Return Value

The created Section.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionidentifier == null
System..::..ArgumentException!(IsValidIdentifier(identifier))
System.ComponentModel..::..InvalidEnumArgumentException!(Enum.IsDefined(typeof(SectionType), type))

Contracts

Requires
identifier != null
IsValidIdentifier(identifier)
Description: The identifier is not valid or reserved.
Exception: System..::..ArgumentException
Enum.IsDefined(typeof(SectionType), type)

See Also