Table of Contents

Class PESectionCollection

Namespace
AsmResolver.PE.File
Assembly
AsmResolver.PE.File.dll

Represents a collection of sections stored in a portable executable file.

public class PESectionCollection : Collection<PESection>, IList<PESection>, ICollection<PESection>, IReadOnlyList<PESection>, IReadOnlyCollection<PESection>, IEnumerable<PESection>, IList, ICollection, IEnumerable
Inheritance
PESectionCollection
Implements
Inherited Members

Constructors

PESectionCollection(PEFile)

Creates a new instance of the PESectionCollection class.

public PESectionCollection(PEFile owner)

Parameters

owner PEFile

The owner of the sections.

Properties

Owner

Gets the PE file containing the sections.

public PEFile Owner { get; }

Property Value

PEFile

Methods

ClearItems()

Removes all elements from the Collection<T>.

protected override void ClearItems()

InsertItem(int, PESection)

Inserts an element into the Collection<T> at the specified index.

protected override void InsertItem(int index, PESection item)

Parameters

index int

The zero-based index at which item should be inserted.

item PESection

The object to insert. The value can be null for reference types.

Exceptions

ArgumentOutOfRangeException
   <code class="paramref">index</code> is less than zero.

-or-

index is greater than Count.

RemoveItem(int)

Removes the element at the specified index of the Collection<T>.

protected override void RemoveItem(int index)

Parameters

index int

The zero-based index of the element to remove.

Exceptions

ArgumentOutOfRangeException
   <code class="paramref">index</code> is less than zero.

-or-

index is equal to or greater than Count.

SetItem(int, PESection)

Replaces the element at the specified index.

protected override void SetItem(int index, PESection item)

Parameters

index int

The zero-based index of the element to replace.

item PESection

The new value for the element at the specified index. The value can be null for reference types.

Exceptions

ArgumentOutOfRangeException
   <code class="paramref">index</code> is less than zero.

-or-

index is greater than Count.