波斯马BOSSMA Information Technology

2012年12月 发布的所有日志

C# 判断是否为可空类型

发布时间:2012年12月2日 / 分类:DOTNET / 抢沙发

判断一个类型是否为可空类型。 bool IsNullableType(Type theType) { return (theType.IsGenericType && theType. GetGenericTypeDefinition().Equals (typeof(Nullable<>))); } 转自:http://blog.csdn.net/lee576/article/details/6335190