i can't print the result in the file
<p>it hit me an error in this line:foreach(var textBox in textBoxes).it doesn't recognise
the:textBoxes.i try to write as TextBox and hits me again an error.i have the Visual C# 2010 Express edition</p>

<pre><code>public Form1()
{
    InitializeComponent();

    private TextBox[] TextBoxes = {textBox1, textBox2, textBox3, textBox4, textBox5, textBox6};

    private List&lt;string&gt; storeItems = new List&lt;string&gt;();
}

private void button1_Click(object sender, EventArgs e)
{
    var buffer = new StringBuilder();
    foreach(var textBox in textBoxes)
    {
        if (string.IsNullOrEmpty(textBox.Text))
        {
            textBox.BackColor = Color.FromName("LightSalmon");
            MessageBox.Show("This item cannot be left blank");
            textBox.Focus();
            return;
        }
        textBox.BackColor = Colors.FromName("Window");
        buffer.Append(textBox.Text);
    }

    var result = buffer.ToString();
    storeItems.Add(result);
    System.IO.File.AppendAllText(@"C:\Users\v\Desktop\text.txt", Environment.NewLine + result);
}
</code></pre>
