Piotr Czajkowski пре 3 дана
родитељ
комит
d49c825ab1
2 измењених фајлова са 2 додато и 3 уклоњено
  1. 0 2
      ExcelORM/ExcelORM/ExcelDynamicWriter.cs
  2. 2 1
      ExcelORM/ExcelORM/TypeExtensions.cs

+ 0 - 2
ExcelORM/ExcelORM/ExcelDynamicWriter.cs

@@ -37,8 +37,6 @@ public class ExcelDynamicWriter : IDisposable
             false => GenerateHeader(worksheet, values.First()),
         };
 
-        if (rowIndex == null) throw new NullReferenceException(nameof(rowIndex));
-
         foreach (var row in values)
         {
             foreach (var cell in row)

+ 2 - 1
ExcelORM/ExcelORM/TypeExtensions.cs

@@ -54,7 +54,8 @@ public static class TypeExtensions
         }
         catch (OverflowException exception)
         {
-            return Nullable.GetUnderlyingType(property.PropertyType) != null ? null : throw exception;
+            if (Nullable.GetUnderlyingType(property.PropertyType) != null) return null;
+            throw;
         }
     }