Thursday, July 13, 2006

 

Asp.NET : How to check whether a file exist or not

There is method which makes it easy to check whether a file exist or not,

Code is given below

C#

if(System.IO.File.Exists(@”c:\test.xml”))

{

//True statements comes here

}

This code check whether a file named “test.xml” exist in the C:\ drive.


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?