TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Freddy Abreu
NA
40
9.5k
Get directory in C#
Jul 26 2013 10:57 AM
Hi everyone
Is my first time trying to get the specific path of a directory please, Why I can not get the path of this program into my listview?
void
MainFormLoad
(
object
sender, EventArgs e)
{
listView1.View = View.Details;
listView1.GridLines =
true
;
listView1.FullRowSelect =
true
;
listView1.Columns.
Add
(
"Directory list:"
);
}
void
Button1Click
(
object
sender, EventArgs e)
{
string
[] Path = Directory.
GetFiles
(
@"C:\Windows\Microsoft.NET\"
,
".dll"
,SearchOption.AllDirectories);
foreach
(
var
list
in
Path){
var
items = listView1.Items;
items.
Add
(list);
}
}
}
}
Reply
Answers (
3
)
How to log into a website with c#
After error crash unable to maximize app from the taskbar