In this
Example, I am creating an enumeration and Call that enumeration into ArrayList
and sort that ArrayList.
Some useful Methods in ArrayList:
- Add
- AddRange
- Remove
- RemoveAt
- Sort
- RemoveRange
Add:
User can add a information into ArrayList
Using Add Method.
This is a Simple
Example for Add Method.
AddRange:
Add the elements of an ICollection to the end of the ArrayList.
ICollection:
· It is an Interface. Because it starts with “I”. Generally, “I” is
called Interface.
· Defines size, enumerators, and
synchronization methods for all nongeneric collections.
Here, I give a sample code for AddRange Method for ArrayList
create a two enumeration .One is ComName and
another one is ComPort.
Remove:
User can remove a list of items in
ArrayList.
User can specify a Word.
RemoveAt:
User can remove a list of items in
ArrayList.
User can specify a Index no.
RemoveRange:
User can remove
a list of items in ArrayList.
User can
specify range of remove.