public static Decimal GetDecimalValue(TableRow row, String key) { String field = SpecflowTableHelper.GetStringRowValue(row, key); return(Decimal.TryParse(field, out Decimal value) ? value : -1); }
public static Int32 GetIntValue(TableRow row, String key) { String field = SpecflowTableHelper.GetStringRowValue(row, key); return(Int32.TryParse(field, out Int32 value) ? value : -1); }
public static Boolean GetBooleanValue(TableRow row, String key) { String field = SpecflowTableHelper.GetStringRowValue(row, key); return(Boolean.TryParse(field, out Boolean value) && value); }
public static Int16 GetShortValue(TableRow row, String key) { String field = SpecflowTableHelper.GetStringRowValue(row, key); if (Int16.TryParse(field, out Int16 value)) { return(value); } else { return(-1); } }