Explorar el Código

Merge pull request #72 from mdum/patch-1

design property: replace try/catch by Enum.IsDefined
master
PrzemyslawKlys hace 9 años
padre
commit
72708a39b3
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4
    4
      DocX/Table.cs

+ 4
- 4
DocX/Table.cs Ver fichero

@@ -441,12 +441,12 @@ namespace Novacode
if (val != null)
{
try
String cleanValue = val.Value.Replace("-", string.Empty);
if (Enum.IsDefined(typeof(TableDesign), cleanValue))
{
design = (TableDesign)Enum.Parse(typeof(TableDesign), val.Value.Replace("-", string.Empty));
design = (TableDesign)Enum.Parse(typeof(TableDesign), cleanValue);
}
catch (Exception)
else
{
design = TableDesign.Custom;
}

Cargando…
Cancelar
Guardar