Sfoglia il codice sorgente

design property: replace try/catch by Enum.IsDefined

master
mdum 9 anni fa
parent
commit
aac62eb89d
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4
    4
      DocX/Table.cs

+ 4
- 4
DocX/Table.cs Vedi File

@@ -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;
}

Loading…
Annulla
Salva