Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

C# / .NET - file exists

0 contributions
12 points

In C# / .NET it is possible to check does file exist in following way.

File.Exists method example

string path = @"C:\path\to\file.txt";

bool exists = File.Exists(path);
Console.WriteLine("File exists: " + (exists ? "Yes" : "No"));

Output:

File exists: No

References

  1. File.Exists Method - Microsoft Docs
0 contributions

Suggested wiki articles:

Suggested findings

Let's do the work and have some fun
  • Dirask is online IT community for professionals and hobbyist to share their knowledge and help each other in extraordinary easy way. ❤ 💻 🙂
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    we will help you. 👍 ✔ 🦄
Read more