Created
November 3, 2020 09:19
-
-
Save shassaan/6545fd1176d8f6af2fcf00b3499e638a to your computer and use it in GitHub Desktop.
AccessDataFromArrayList
This file contains 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 | |
int firstElement = (int) arlist[0]; | |
string secondElement = (string) arlist[1]; | |
//using var keyword without explicit casting | |
var firstElement = arlist[0]; | |
var secondElement = arlist[1]; | |
//update elements | |
arlist[0] = "Steve"; | |
arlist[1] = 100; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment