< Introduction to .NET Framework 3.0

Microsoft has introduced new generical features in its .NET 3.0. Until now, it was mandatory that the whole list should be declared as a single data type. However, in .NET 3.0, it is possible to have multiple declarations of the same list with multiple data type and the datatype of the data contained in it changes.

Example

List<string> customerList = new List<string>(); 
customerList.Add('Ravi');
customerList.Add('Bala');
List<int> customerList = new List<int>();
customerList.Add(1);
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.