( blr | 2015. 06. 23., k – 20:14 )

Így nem kell a textBox1-nek publicnak lennie:


    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public Form1(string text):this()
        {
            textBox1.Text = text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form1 f = new Form1(textBox1.Text);
            f.ShowDialog();
        }
    }