/// Remove and return the first item in the list, otherwise return null.
public static TType TakeFirst
if ( list == null ) {
throw new ArgumentNullException( "list" );
}
if ( list.Count <= 0 ) {
return default( TType );
}
var item = list[ 0 ];
list.RemoveAt( 0 );
return item;
}
No comments:
Post a Comment