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