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
Add(T)
- This method is not supported.Clear()
- This method is not supported.Contains(T)
- Not documented yet.CopyTo(PeterO.T<>[], int)
- Not documented yet.Count
- Gets a value not documented yet.GetEnumerator()
- Not documented yet.IndexOf(T)
- Not documented yet.Insert(int, T)
- This method is not supported.IsReadOnly
- Gets a value indicating whether this list segment is read only.Remove(T)
- This method is not supported.RemoveAt(int)
- This method is not supported.StartIndex
- Gets the starting index within the underlying list for this list segment.this[int]
- Not documented yet.
Parameters:
- <T>: Any object type.
ListSegment Constructor
public ListSegment( System.Collections.Generic.IList<T> list, int start, int count);
Initializes a new instance of the class.
Parameters:
list: The parameter list is an IList object.
start: The parameter start is a 32-bit signed integer.
count: The parameter count is a 32-bit signed integer.
Exceptions:
- System.ArgumentNullException: The parameter list is null.
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:
- index: The parameter index is a 32-bit signed integer.
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:
- item: The parameter item is a `0 object.
Exceptions:
- System.NotSupportedException: Always thrown, because changing the size of a list segment is not supported.
Clear
public sealed void Clear();
This method is not supported.
Contains
public sealed bool Contains( T item);
Not documented yet.
Parameters:
- item: The parameter item is a `0 object.
Return Value:
Either true
or false
.
CopyTo
public sealed void CopyTo( PeterO.T<>[] array, int arrayIndex);
Not documented yet.
Parameters:
array: The parameter array is a `0[] object.
arrayIndex: The parameter arrayIndex is a 32-bit signed integer.
Exceptions:
System.ArgumentNullException: The parameter array is null.
System.ArgumentException: Array index and count must fit the bounds of the array.
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:
- item: The parameter item is a `0 object.
Return Value:
A 32-bit signed integer.
Insert
public sealed void Insert( int index, T item);
This method is not supported.
Parameters:
index: The parameter index is a 32-bit signed integer.
item: The parameter item is a T object.
Remove
public sealed bool Remove( T item);
This method is not supported.
Parameters:
- item: The parameter item is a T object.
Return Value:
Either true
or false
.
RemoveAt
public sealed void RemoveAt( int index);
This method is not supported.
Parameters:
- index: The parameter index is a 32-bit signed integer.