CSharp examples for System.Reflection:Type
Is Nullable Type
//Copyright (C) Microsoft Corporation. All rights reserved. using System.Threading; using System.Reflection.Emit; using System.Reflection; using System.Linq.Expressions; using System.Text; using System.Collections.Generic; public class Main{ static bool IsNullableType(Type type) {/*from ww w . ja va 2 s . c om*/ return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); } }