Hello,
I'm a self-taught programmer, so please bear with me.
I'm writing a program where a text file is parsed and each line is
added to a database. A challenge I'm faced with is the user is going
to specify a different text file each time. I want to implement a
button like the Choose File button for attaching a file in a new
message on Gmail. I've searched Google and I've found many examples
for ASP pages and a few examples in C# where the person answering the
question used nomenclature I couldn't understand. I also came across
many snarky answers. Could someone please explain how to do it in C#
not using that bizarre "Dim" nomenclature the MSDN library uses? Thank
you.
If it helps, here's an example I could understand and I'll explain
what confused me.
private void button2_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
CenariosText.Text = openFileDialog1.FileName;
}
I understand the button2_Click line. I understand CenariosText is the
name of the text box on the Form. I don't understand what
openFileDialog1 is. Is it the name of the variable storing the name of
the file to open? If not, what is it?
Thank you!