Created
March 27, 2014 10:55
-
-
Save baba-s/9804948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.Linq; | |
| /// <summary> | |
| /// IEnumerable型の拡張メソッドを管理するクラス | |
| /// </summary> | |
| public static partial class IEnumerableExtensions | |
| { | |
| /// <summary> | |
| /// 指定されたシーケンスがnullまたは空であるかどうかを示します | |
| /// </summary> | |
| /// <typeparam name="T">シーケンスの型</typeparam> | |
| /// <param name="items">テストするシーケンス</param> | |
| /// <returns>itemsパラメーターがnullまたは空のシーケンスの場合はtrue。それ以外の場合はfalse</returns> | |
| public static bool IsNullOrEmpty<T>(this IEnumerable<T> items) | |
| { | |
| return items == null || !items.Any(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment