private void btnCreaClasse_Click(object sender, EventArgs e)
        {
            EsSingleton s = EsSingleton.GetEsSingleton(Convert.ToInt32(txtValore.Text));

            MessageBox.Show("Valore = " + s.val);
            EsSingleton s1 = EsSingleton.GetEsSingleton(0);

            MessageBox.Show("Valore di s1: " + s1.val);

            MessageBox.Show("Valore di s: " + s.val);
        }
        public static EsSingleton GetEsSingleton(int valore)
        {
            if (instance == null)
            {
                instance = new EsSingleton(valore);
            }
            else
            {
                instance.val = valore;
            }

            return(instance);
        }