Created
November 3, 2020 10:14
-
-
Save shassaan/1f54bb9fd76dc6928f2c13324a58ac54 to your computer and use it in GitHub Desktop.
RetrieveDataFromList
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Access individual item using indexer | |
List<int> numbers = new List<int>() | |
{ 1, 2, 5, 7, 8, 10 }; | |
Console.WriteLine(numbers[0]); // prints 1 | |
Console.WriteLine(numbers[1]); // prints 2 | |
Console.WriteLine(numbers[2]); // prints 5 | |
Console.WriteLine(numbers[3]); // prints 7 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment