Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The .NET class library provides a number of generic collection classes in the System.Collections.Generic and System.Collections.ObjectModel namespaces. For more detailed information about these classes, see Commonly Used Collection Types.
System.Collections.Generic
Many of the generic collection types are direct analogs of nongeneric types. Dictionary
List
There are generic and nongeneric versions of SortedList
The LinkedList
System.Collections.ObjectModel
The Collection
Other generic types
The Nullablenull. This can be useful when working with database queries, where fields that contain value types can be missing. The generic type parameter can be any value type.
Note
In C# and Visual Basic, it is not necessary to use Nullable
The ArraySegment
The EventHandlerMyEventArgs class, derived from EventArgs, to hold the data for your event. You can then declare the event as follows:
public event EventHandler MyEvent;
Public Event MyEvent As EventHandler(Of MyEventArgs)