Exemple #1
0
 /// <summary>
 /// 指定された型がコレクション型かどうかを判定します。
 /// </summary>
 /// <param name="type">型情報</param>
 /// <returns>コレクション型かどうか</returns>
 public static bool IsCollection(this System.Type type) => This.GetElementType(type) != null;
Exemple #2
0
 /// <summary>
 /// 指定されたコレクションを表す型情報から要素の型情報を取得します。
 /// </summary>
 /// <typeparam name="TCollection">コレクションの型情報</typeparam>
 /// <returns></returns>
 public static Type GetElementType <TCollection>() => This.GetElementType(typeof(TCollection));