Created
May 26, 2021 13:03
-
-
Save Lahirutech/6d1dab56613781f8ab4c9edeb23cd469 to your computer and use it in GitHub Desktop.
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
var numbers = new List<int>(){ 10, 20, 30, 40, 10 }; | |
numbers.Remove(10); // removes the first 10 from a list | |
numbers.RemoveAt(2); //removes the 3rd element (index starts from 0) | |
//numbers.RemoveAt(10); //throws ArgumentOutOfRangeException | |
foreach (var el in intList) | |
Console.Write(el); //prints 20 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment