public void FromString(string value, decimal expected) { Assert.Equal(expected, DecimalType.FromString(value)); }
public void FromString_Invalid() { Assert.Throws <OverflowException>(() => DecimalType.FromString("9999999999999999999999999999999999999")); Assert.Throws <InvalidCastException>(() => DecimalType.FromString("abc")); }
private void AgregarDetalle() { this.Cursor = Cursors.WaitCursor; if (!this.ExistePrestacion(this.cboPrestacion.Identificador)) { this.DesplegarDatos(this.cboPrestacion.Identificador, ((ComboBox)this.cboPrestacion).Text, DecimalType.FromString(((TextBox)this.txtMonto).Text)); this.LimpiarPrestacion(); } this.ActiveControl = (Control)this.cboPrestacion; this.Cursor = Cursors.Default; }