private void button1_Click(object sender, EventArgs e) { var key = (int)numericUpDown1.Value; var value = textBox1.Text; cacher.ChangeStr(key, value); }