I'm a student currently learning C#. I tried writing this routine but I get an error which tells me that a "}" is expected. However when I add the "}" I get a whole lot of other errors. I presume it's because you don't add a "}" before an "else" statement. This is my code:

```
private void PathExist()
{
    if (Directory.Exists(folderBrowserDialog.SelectedPath + @"\"))
        lblExist.Visible = false;
        Properties.Settings.Default.FirstTime = false;
        // Create a new instance of the Form2 class
        MainFrm MainForm = new MainFrm();
        MainForm.Show();
        Hide();//This is where Visual Studio is telling me that a "}" is expected
    else
    {
        lblExist.Visible = true;
        lblExist.Text = "Folder doesn't exist";
        lblExist.ForeColor = Color.Red;
    }
}

```