public static void IsGenericNotNull <T>(T pv_tValue, string pv_strName) { Type type = typeof(T); if (type.IsClass || GenericsHelper.IsNullable(type)) { IsNotNull(pv_tValue as object, pv_strName); } }
public static void IsInRange <T>(T pv_tValue, string pv_strName, T pv_tLow, T pv_tHigh) where T : class { Type objValueType = typeof(T); if (objValueType.IsClass || GenericsHelper.IsNullable(objValueType) ) { IsReferenceTypeInRange <T>( pv_tValue, pv_strName, pv_tHigh, pv_tLow); } else { IsValueTypeInRange <T>( pv_tValue, pv_strName, pv_tHigh, pv_tLow); } }