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.
Add items to listview
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

ido shahar24 reputationPosted May 18, 2009, 1:27 AM EDT
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.
Kirtan PatelRank #292 · 8.6K reputationPosted May 18, 2009, 12:46 PM EDT
{
foreach (string filename in Directory.GetFiles(@"C:\"))
{
listView1.Items.Add(filename.ToString());
}
}