namespace numericUpDown
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//===============numericUpDown================
numericUpDown1.Minimum = 1;
numericUpDown1.Maximum = 20;
numericUpDown1.DecimalPlaces = 2;
numericUpDown1.Increment = 0.2M;
//===============domainUpDown================
domainUpDown1.Items.Add("station1");
domainUpDown1.Items.Add("station2");
domainUpDown1.Items.Add("station3");
domainUpDown1.Items.Add("station4");
domainUpDown1.SelectedIndex = 1;
}
private void numericUpDown1_Click(object sender, EventArgs e)
{
num.Text = numericUpDown1.Value.ToString("0.00");
}
private void button1_Click(object sender, EventArgs e)
{
var sel_index = domainUpDown1.SelectedIndex;
var sel_item = domainUpDown1.SelectedItem;
var allItems = domainUpDown1.Items;
}
}
}
Download the project of Visual Studio 2013 in DropBox Download