C# List List()
Description
List
initializes a new instance
of the List
Syntax
public List()
Example
using System;// w w w. jav a2 s. c o m
using System.Collections.Generic;
public class Example
{
public static void Main()
{
List<string> myData = new List<string>();
Console.WriteLine("\nCapacity: {0}", myData.Capacity);
}
}
The code above generates the following result.