TryGetLast()
System::Collections::Generic::Details::TryGetLast(IEnumerable<T>&, bool&) function
Tries to get the last element of the collection.
template<typename T> T System::Collections::Generic::Details::TryGetLast(IEnumerable<T> &enumerable, bool &found)
Template parameters
Parameter | Description |
---|---|
T | The type of the collection elements. |
Arguments
Parameter | Type | Description |
---|---|---|
enumerable | IEnumerable<T>& | The collection from which an element is to be acquired. |
found | bool& | The output parameter. Returns true when the collection contains any element. Otherwise false is returned. |
Return Value
Returns the last collection element. The default value of the type will be returned when the collection is empty.
See Also
- Class IEnumerable
- Namespace System::Collections::Generic::Details
- Library Aspose.Slides