Created
September 11, 2019 13:11
-
-
Save Const-me/63d11f7872cb92c61651a7d6087ba7c3 to your computer and use it in GitHub Desktop.
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
static class Utils | |
{ | |
/// <summary>Append a new item to list, return that item</summary> | |
public static E appendNew<E>( List<E> list ) where E : new() | |
{ | |
E newVal = new E(); | |
list.Add( newVal ); | |
return newVal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment