@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Infrastructure.Extention
|
||||
{
|
||||
public static class StringExtension
|
||||
{
|
||||
|
||||
|
||||
// 扩展 string 类型
|
||||
public static bool IsNullOrEmpty(this string value)
|
||||
{
|
||||
return string.IsNullOrEmpty(value);
|
||||
}
|
||||
|
||||
// 扩展 IEnumerable<T> 类型
|
||||
public static bool IsNullOrEmpty<T>(this IEnumerable<T> enumerable)
|
||||
{
|
||||
return enumerable == null || !enumerable.Any();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user