CSharp examples for System.Reflection:Type
Is Nullable
using System.Reflection; using System.Linq; using System.Collections.Generic; using System;//www . j a v a2s . c om public class Main{ public static bool IsNullable(this Type type) { return type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); } }