Created
November 4, 2020 13:31
-
-
Save SnowyPainter/ef208bc5805e31b39aa06173c974acb9 to your computer and use it in GitHub Desktop.
In short, all of the List<inheritances> of INTERFACE can be called, It actually works just like Stack.Pop
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
| public static class ListsExtension | |
| { | |
| public static T Pop<T>(this List<T> clist, int index) where T : INTERFACE | |
| { | |
| var c = clist[index]; | |
| cargos.RemoveAt(index); | |
| return c; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment