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 |
Return Value
Type | Description |
---|---|
T |