Windows Phone Developers

Showing posts with label IsExist Method in C#. Show all posts
Showing posts with label IsExist Method in C#. Show all posts

Saturday, November 1, 2008

Check if file exists using C# (.NET)

Check Existence of File using C# (.NET)

Exists method of the System.IO.File class can be used to check if a file exists in a given location.

private static bool Check_file_Existence(string sFileName)

{

try

{

if (File.Exists(sFileName) == true)

{return true;

}

else

{ return false; }

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

return false;

}

}

, IsExist Method in .NET, .NET File Class, .NET Exists Method

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon