I am beginning C# and have started a project that will most likely require lots of googling and help from other people in order to learn more about C#. I have a little bit of programming experience but not to much.
I am trying to create my own version of windows explorer, but I cannot figure out how to load files into the listview that I created. I am sure there is an easy way and yes I have googled it but I didnt understand some of it. It would be nice if someone could provide me with an example of how to do add files to a listview.
Loading
Kirtan PatelPosted May 18, 2009, 4:46 PM
{
foreach (string filename in Directory.GetFiles(@"C:\"))
{
listView1.Items.Add(filename.ToString());
}
}
ido shaharPosted May 18, 2009, 5:27 AM
Hi,
Can you provide an example from your code? it will help us to assist you.
if i got what you asked for, its will be as the follow example:
for (int i = 1; i <= 50; i++)
{
listBox1.Items.Add("Item " + i.ToString());
}
also you can using the foreach command.