CSharp examples for System.Reflection:Type
Returns a value that indicates whether current type is generic
// Copyright (c) Costin Morariu. All rights reserved. using System.Reflection; using System.Collections.Generic; using System;/*from w w w . j av a 2 s . c om*/ public class Main{ /// <summary> /// Returns a value that indicates whether current type is generic /// </summary> /// <param name="type">Current type</param> /// <returns>True if current type is generic, otherwise false</returns> public static bool IsGenericType(this Type type) { return type.GetTypeInfo().IsGenericType; } }