Archive for July 13, 2006
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.