string[] klasorlistesi = Directory.GetFiles(path+"//notlar//");
foreach (string eleman in klasorlistesi)
listBox1.Items.Add(eleman);
I’m getting the datas from an array with through above code inside listBox.
BTW the file has no extension.
My question is:
I want to appear the file as only "not" instead of "C:\Users\Documents\Visual Studio 2008\not" inside the Listbox.
Also, I tried a thing like below code, but it’s not working:
System.IO.Path.GetFileName(@"C:\Users\Documents\Visual Studio 2008\not");
How can I do that?
You could use something like