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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Verify path is directory or file in C#
Hiren Soni
May 24, 2012
8
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This blog shows how to Verify path of directory or file using c#
string path=@"C:\Desktop";
if (System.IO.Directory.Exists(path))
{
MessageBox.Show("Directory");
}
if(System.IO.File.Exists(path))
{
MessageBox.Show("File");
}
Next Recommended Reading
Get am/pm from datetime in sql query