WeaverUtilities.

PopLastOrCreate<T>(List<T>) Method

Summary

Removes and returns the last element in a list or creates a new one if the list is empty.
Assembly
Weaver.dll
Namespace
Weaver
Containing Type
WeaverUtilities

Syntax

public static T PopLastOrCreate<T>(this List<T> list) where T : new()

Type Parameters

Name Description
T

Parameters

Name Type Description
list List<T>

Return Value

Type Description
T