構成ファイルに書き込む場所からいくつかの構成フォームがあります。最大値は 100 で、ファイルに場所を保存したいので、どうすれば int16 をファイルに書き込むことができますか?
private void butSave_Click(object sender, EventArgs e)
    {
        if (valChanged == true)
        {
            Properties.Settings.Default.Save();
            Assembly assem = Assembly.GetEntryAssembly();
            string dir = Path.GetDirectoryName(assem.Location);
            string filePath = Path.Combine(dir, "./conf/config.dat");
            try
            {
                FileStream fs = new FileStream(filePath, FileMode.Open);
                BinaryWriter wr = new BinaryWriter(fs);
                fs.Position = 0;
                wr.Write(checkBox1.Checked);
                wr.Write(checkBox2.Checked);
                fs.Position = 16;
                wr.Write(numericUpDown1.Value);
                wr.Write(numericUpDown2.Value);
                wr.Write(numericUpDown3.Value);
                wr.Write(numericUpDown4.Value);
                wr.Close();
                Form1 main = new Form1();
                main.Show();
                this.Close();
            }
            catch
            {
                MessageBox.Show("Would you like to create a new config file", "File not found!", MessageBoxButtons.YesNoCancel);
            }
        }
    }