12345678910111213141516171819202122232425262728 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Text;
- namespace TEAMModelOS.SDK
- {
- public static class CollectionHelper
- {
- /// <summary>
- /// 判断集合是否不为空
- /// </summary>
- /// <param name="collection"></param>
- /// <returns></returns>
- public static bool IsNotEmpty(this ICollection collection)
- {
- if (collection != null && collection.Count > 0)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- }
|