|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Represents an enhanced version of the System.Collections.IList interface.
Method Summary | |
---|---|
bool |
Add(System.Collections.ICollection collection) When implemented by a class, adds the elements of the specified System.Collections.ICollection to the end of the list. |
bool |
Contains(System.Collections.ICollection collection) When implemented by a class, determines whether all the elements in the specified collection are contained in the System.Collections.IList contains. |
System.Collections.IEnumerator |
GetEnumerator(int index) When implemented by a class, returns an System.Collections.IEnumerator that can iterate through the list that starts at the specified position. |
bool |
Insert(int index, System.Collections.ICollection collection) When implemented by a class, inserts the elements of the System.Collections.ICollection to the list at the specified position. |
bool |
Insert(int index, object value) When implemented by a class, inserts an object to the list at the specified position. |
int |
LastIndexOf(object value) When implemented by a class, determines the index of the last occurrence of the specific object in the list. |
bool |
Remove(System.Collections.ICollection collection) When implemented by a class, removes the first occurrence of each element of the specified System.Collections.ICollection from the list. |
bool |
Remove(int index, int count) When implemented by a class, removes the specified number of the elements starting at the position specified. |
bool |
Remove(object value) When implemented by a class, removes the first occurrence of a specific object from the list. |
bool |
RemoveAt(int index) When implemented by a class, removes the element at the specified position from the list. |
bool |
Retain(System.Collections.ICollection collection) When implemented by a class, retains the first occurrence of each element of the specified System.Collections.ICollection from the list. |
System.Collections.IList |
SubList(int index, int count) When implemented by a class, provides a view of the list with the specified number of the elements starting at the position specified. |
Method Detail |
---|
public bool Add(System.Collections.ICollection collection)
When implemented by a class, adds the elements of the specified System.Collections.ICollection to the end of the list.
Parameters:
collection
-
The System.Collections.ICollection whose elements are to be added to
the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool Contains(System.Collections.ICollection collection)
When implemented by a class, determines whether all the elements in the specified collection are contained in the System.Collections.IList contains.
Parameters:
collection
-
The System.Collections.ICollection whose elements are to be added
to the end of the list.
public System.Collections.IEnumerator GetEnumerator(int index)
When implemented by a class, returns an System.Collections.IEnumerator that can iterate through the list that starts at the specified position.
Parameters:
index
-
Starting index in the list for the begining of
the System.Collections.IEnumerator.
public bool Insert(int index, System.Collections.ICollection collection)
When implemented by a class, inserts the elements of the System.Collections.ICollection to the list at the specified position.
Parameters:
index
-
The zero-based index at which
collection should be inserted.
collection
-
The System.Collections.ICollection whose elements are to be added to
the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool Insert(int index, object value)
When implemented by a class, inserts an object to the list at the specified position.
This method hides the System.Collections.IList method that returns void. You may want to do an explicit interface method implementation for the System.Collections.IList version to be completely compatible.
Parameters:index
-
The zero-based index at which value should be inserted.
value
-
The object to insert into the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public int LastIndexOf(object value)
When implemented by a class, determines the index of the last occurrence of the specific object in the list.
Parameters:
value
-
The object to locate in the list.
public bool Remove(System.Collections.ICollection collection)
When implemented by a class, removes the first occurrence of each element of the specified System.Collections.ICollection from the list.
Parameters:
collection
-
The System.Collections.ICollection used to determine what
elements to remove from the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool Remove(int index, int count)
When implemented by a class, removes the specified number of the elements starting at the position specified.
Parameters:
index
-
Starting index for removing elements from the
list.
count
-
The number of elements to remove from the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool Remove(object value)
When implemented by a class, removes the first occurrence of a specific object from the list.
This method hides the System.Collections.IList method that returns void. You may want to do an explicit interface method implementation for the System.Collections.IList version to be completely compatible.
Parameters:value
-
The object to remove from the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool RemoveAt(int index)
When implemented by a class, removes the element at the specified position from the list.
Parameters:
index
-
The index of the element to remove from the
list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public bool Retain(System.Collections.ICollection collection)
When implemented by a class, retains the first occurrence of each element of the specified System.Collections.ICollection from the list.
Parameters:
collection
-
The System.Collections.ICollection used to determine what
elements to be retained in the list.
System.NotSupportedException
- The list is read-only.
-or-The list has a fixed size.
public System.Collections.IList SubList(int index, int count)
When implemented by a class, provides a view of the list with the specified number of the elements starting at the position specified.
The list that is returned is just a view, it is still backed by the orignal list. Any changes you make to it will be reflected in the orignal list.
Parameters:index
-
Starting index for the view of elements from
the list.
count
-
The number of elements to include in the view of the list.
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |