PeterO.ListSegment-T

PeterO.ListSegment

public sealed class ListSegment<T> :
    System.Collections.Generic.ICollection<T>,
    System.Collections.Generic.IEnumerable<T>,
    System.Collections.Generic.IList<T>,
    System.Collections.IEnumerable

Specifies a segment of a list defined by an offset and length. This class cannot be inherited.

Member Summary

Parameters:

ListSegment Constructor

public ListSegment(
    System.Collections.Generic.IList<T> list,
    int start,
    int count);

Initializes a new instance of the class.

Parameters:

Exceptions:

Count

public sealed int Count { get; }

Gets a value not documented yet.

Returns:

A value not documented yet.

IsReadOnly

public sealed bool IsReadOnly { get; }

Gets a value indicating whether this list segment is read only.

The read-only status of the list segment is the same as that of the underlying list. However, operations that would change the list segment's size, such as adding and removing items, are not supported.

Returns:

true if this list segment is read only; otherwise, false .

Item

public sealed T this[int index] { get; set; }

Not documented yet.

Parameters:

Return Value:

A T object.

StartIndex

public int StartIndex { get; }

Gets the starting index within the underlying list for this list segment.

Returns:

The starting index within the underlying list for this list segment.

Add

public sealed void Add(
    T item);

This method is not supported.

Parameters:

Exceptions:

Clear

public sealed void Clear();

This method is not supported.

Contains

public sealed bool Contains(
    T item);

Not documented yet.

Parameters:

Return Value:

Either true or false .

CopyTo

public sealed void CopyTo(
    PeterO.T<>[] array,
    int arrayIndex);

Not documented yet.

Parameters:

Exceptions:

GetEnumerator

public sealed System.Collections.Generic.IEnumerator<T> GetEnumerator();

Not documented yet.

Return Value:

An IEnumerator(T) object.

IndexOf

public sealed int IndexOf(
    T item);

Not documented yet.

Parameters:

Return Value:

A 32-bit signed integer.

Insert

public sealed void Insert(
    int index,
    T item);

This method is not supported.

Parameters:

Remove

public sealed bool Remove(
    T item);

This method is not supported.

Parameters:

Return Value:

Either true or false .

RemoveAt

public sealed void RemoveAt(
    int index);

This method is not supported.

Parameters:

Back to petero-csharp start page.