You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
650 B
30 lines
650 B
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Soul2.General.utils
|
|
{
|
|
public class CollectionsUtils
|
|
{
|
|
public static bool isNotEmpty(IEnumerable collection)
|
|
{
|
|
return !isEmpty(collection);
|
|
}
|
|
|
|
public static bool isEmpty(IEnumerable collection)
|
|
{
|
|
if (collection == null)
|
|
{
|
|
return true;
|
|
}
|
|
foreach (var item in collection)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|