private void nUnitsOutside_ValueChanged(object sender, EventArgs e) { NumericUpDown nud; nud = (NumericUpDown)sender; map.ChangeUnitsOutside(Convert.ToInt32(nud.Value)); }