判断一个类型是否为可空类型。
bool IsNullableType(Type theType) { return (theType.IsGenericType && theType. GetGenericTypeDefinition().Equals (typeof(Nullable<>))); }
发布时间:2012年12月2日 / 分类:DOTNET / 10,239 次浏览 / 评论
判断一个类型是否为可空类型。
bool IsNullableType(Type theType) { return (theType.IsGenericType && theType. GetGenericTypeDefinition().Equals (typeof(Nullable<>))); }
发表评论