Use:
File.Exists(path)
MSDN: http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
Edit: In System.IO
More Related Contents:
- How to check for file lock? [duplicate]
- How to add a Timeout to Console.ReadLine()?
- Calculate the execution time of a method
- Cannot delete directory with Directory.Delete(path, true)
- What is the difference between Directory.EnumerateFiles vs Directory.GetFiles?
- How to find and replace text in a file
- Does FileStream.Dispose close the file immediately?
- How can I split (copy) a Stream in .NET?
- Sending email through Gmail SMTP server with C#
- Easiest way to split a string on newlines in .NET?
- How to flatten tree via LINQ?
- Best and shortest way to evaluate mathematical expressions
- Why does the order of alternatives matter in regex?
- When should I use Lazy?
- How do I exit a WPF application programmatically?
- Does .NET FtpWebRequest Support both Implicit (FTPS) and explicit (FTPES)?
- Base32 Decoding
- What is a good unique PC identifier?
- How to make make a .NET COM object apartment-threaded?
- What is the difference between int, Int16, Int32 and Int64?
- CryptographicException was unhandled: System cannot find the specified file
- How to serialize an Exception object in C#?
- Get Cell Value from a DataTable in C#
- Looking for a Command Line Argument Parser for .NET [closed]
- MEF with MVC 4 or 5 – Pluggable Architecture (2014)
- The extern alias ‘xxx’ was not specified in a /reference option
- ThreadStaticAttribute in ASP.NET
- Is it possible to bind complex type properties to a datagrid?
- .net connection pooling
- Garbage Collection not happening even when needed