Skip to content

Instantly share code, notes, and snippets.

@Lahirutech
Created May 22, 2021 11:14
Show Gist options
  • Save Lahirutech/87712a5de588b77ab1afce34e166644c to your computer and use it in GitHub Desktop.
Save Lahirutech/87712a5de588b77ab1afce34e166644c to your computer and use it in GitHub Desktop.
ArrayList arlist = new ArrayList()
{
1,
"Bill",
300,
4.5F
};
foreach (var item in arlist)
Console.Write(item + ", "); //output: 1, Bill, 300, 4.5,
for(int i = 0 ; i < arlist.Count; i++)
Console.Write(arlist[i] + ", "); //output: 1, Bill, 300, 4.5,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment