判断一个类型是否为可空类型(System.Nullable)

    技术2022-05-19  19

    bool IsNullableType(Type theType) { return (theType.IsGenericType && theType. GetGenericTypeDefinition().Equals (typeof(Nullable<>))); } 


    最新回复(0)