Checking if a file exist or not

You can use System.IO.File class's static method Exists to check on runtime if a file exists or not?

if (System.IO.File.Exists("C:\\Test.txt"))

Türkçe'si için tiklayin.

Ebook Download
View all
Learn
View all