string s1 = "csharpfr.com"; List< string > list1 = new List< string >( ); //list1[ 0 ] = s1; // KO, Count == 0 list1.Add( s1 ); MessageBox.Show( list1[ 0 ] ); // OK, Count == 1 List< string > list2 = new List< string >( new string[ 10 ] ); list2[ 9 ] = s1; // OK, Count == 10 MessageBox.Show( list2[ 9 ] );
public T this [ int index ] { get; set; }