I'm learning C and C#, the question is for C#, I'm reading this programming book and this code is not compiling.
FileDialog
is only showing two methods in intellisense(Equals and ReferenceEquals). The code is from a book so it is expected that this method and property are part of the FileDialog
class right?
Here is the code:
private void cmdBrowse_Click(object sender, EventArgs e
{
if (FileDialog.ShowDialog() != DialogResult.Cancel)
{
txtLocation.Text = FileDialog.FileName;
cmdWatch.Enabled = true;
FileDialog.
}
}
EDIT: I found out what the problem was, I hadn't added a filedialog to the form, I didn't know what a filedialog was, now I remember. Dohh