I am trying to get the name of all files inside of a folder(Only Once Per File & only when this form loads (for now)) and put them inside of a list box, each file in the folder as their own "Item". I am running into a problem where when I try pointing to a specific folder to get all of the files it gives me an error.
Am I just Using the wrong method?
namespace Experiment
{
public partial class Form2 : Form
{
public static String StockPath = "D:/Visual Studios/Projects CustomFileSystems/FolderOne/Files";
public Form2()
{
InitializeComponent();
Movie_Checkedlistbox.Items.Add(System.IO.Path.GetFileNameWithoutExtension(StockPath))
}
private void Movie_Checkedlistbox_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…