Creates a new Section and adds it to the ObjectFile.
Namespace: SharpAssembler.CoreAssembly: 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
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | identifier == null |
| System..::..ArgumentException | !(IsValidIdentifier(identifier)) |
| System.ComponentModel..::..InvalidEnumArgumentException | !(Enum.IsDefined(typeof(SectionType), type)) |
Contracts
| Requires | ||||
|---|---|---|---|---|
identifier != null
| ||||
IsValidIdentifier(identifier)
| ||||
Enum.IsDefined(typeof(SectionType), type) |