Skip to content

Commit

Permalink
эксперименты с классом List
Browse files Browse the repository at this point in the history
  • Loading branch information
kartavec committed Sep 12, 2015
1 parent 5d0008d commit f0d72dc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Snake/Snake/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ static void Main( string[] args )
Point p2 = new Point(4, 5, '#');
p2.Draw();

List<int> numList = new List<int>();
numList.Add( 0 );
numList.Add( 1 );
numList.Add( 2 );

int x = numList[ 0 ];
int y = numList[ 1 ];
int z = numList[ 2 ];

foreach(int i in numList)
{
Console.WriteLine( i );
}

numList.RemoveAt( 0 );

List<Point> pList = new List<Point>();
pList.Add( p1 );
pList.Add( p2 );

Console.ReadLine();
}
}
Expand Down

0 comments on commit f0d72dc

Please sign in to comment.