Basically I was attempting to use an open file dialog and a list box to list recently opened files in a list box also yes I do use fastcoloredtextbox why do 90% of people I talk to hate it also sorry if the code looks like it was designed by some depressed 11 year old because I am very new.
private void button5_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
string fm = openFileDialog1.FileName;
string rf = File.ReadAllText(fm);
fastColoredTextBox.Text = rf;
string files = Path.GetFileName(fm);
foreach (string file in files)
{
listBox1.Items.Add(file);
}
}
Also it looks unfinished because it is unfinished - I've been trying to fix this and it just kept making more errors so like yea uhh help random people on the internet who I don't know uhh I'm going to stop randomly typing things now
wow edit #3 if it helps anyone I'm having the error on
foreach (string file in files)