Skip to content

Instantly share code, notes, and snippets.

@shassaan
Created November 3, 2020 09:19
Show Gist options
  • Save shassaan/6545fd1176d8f6af2fcf00b3499e638a to your computer and use it in GitHub Desktop.
Save shassaan/6545fd1176d8f6af2fcf00b3499e638a to your computer and use it in GitHub Desktop.
AccessDataFromArrayList
//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