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
To check file exists or not in c#
Venkatesan Jayakantham
May 04, 2012
10.9
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
To check file exists or not in c#
Method to check whether the file is exist or not,
C#
if(System.IO.File.Exists(@”d:\mytest.xml”))
{
//True statements comes here
}
This code check whether a file named “mytest.xml” exist in the D:\ drive or not.
Cheers,
Venkatesan Prabu .J
Next Recommended Reading
Program to Check Whether a String Palindrome is or not