I found I could get a file by:
var files = System.IO.Directory.GetFiles("Some Directory");
The file is one contained within this collection;
However is there a method to get a single file by passing the file path tothis method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are alot of ways to directly access a file by path. Here are a few:
Essentially everything the ‘File’ class does is related to a single file. Its a static class in the System.IO namespace.
http://msdn.microsoft.com/en-us/library/system.io.file.aspx