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
steve potts
NA
29
10.6k
listview to return filename and file owner
Aug 7 2012 5:13 AM
I have a listview, and currently i return the filenames like this..
foreach (string file in files)
{
if (System.Text.RegularExpressions.Regex.IsMatch(file, sPattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase))
{
listView1.Items.Add(file);
}
what i would like to do is also be able to retrive the file owner, which i think i can do with this code, but im not sure how to do it along side my existing code and get into the listview alongside the filename?
this gets the file owner i think..
System.IO.File.GetAccessControl(file).GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();
thanks, steve.
Reply
Answers (
3
)
Displaying PDF documents in a visual C# application
I do not know where I went wrong, Could some one help me please