11,567 questions
Maybe like this:
if( !File.Exists( "File1.txt" ) )
{
Console.WriteLine( "The file cannot be found." );
}
else
{
using StreamReader File1 = new( "File1.txt" );
// . . .
}
However the solutions that are based on FileNotFoundException are more reliable, I think.