mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
fix: Fixing dumb mistake in TryFirst and TryLast extensions
This commit is contained in:
parent
742b7e99aa
commit
e0176741d2
1 changed files with 0 additions and 19 deletions
|
|
@ -79,15 +79,6 @@ namespace ICD.Common.Utils.Extensions
|
|||
|
||||
item = default(T);
|
||||
|
||||
IList<T> list = extends as IList<T>;
|
||||
if (list != null)
|
||||
{
|
||||
if (list.Count <= 0)
|
||||
return false;
|
||||
item = list[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
using (IEnumerator<T> iterator = extends.GetEnumerator())
|
||||
{
|
||||
while (iterator.MoveNext())
|
||||
|
|
@ -135,16 +126,6 @@ namespace ICD.Common.Utils.Extensions
|
|||
throw new ArgumentNullException("predicate");
|
||||
|
||||
item = default(T);
|
||||
|
||||
IList<T> list = extends as IList<T>;
|
||||
if (list != null)
|
||||
{
|
||||
if (list.Count <= 0)
|
||||
return false;
|
||||
item = list[list.Count - 1];
|
||||
return true;
|
||||
}
|
||||
|
||||
bool output = false;
|
||||
|
||||
using (IEnumerator<T> iterator = extends.GetEnumerator())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue