Skip to content

Instantly share code, notes, and snippets.

@HamidMosalla
Created February 28, 2018 20:52
public void OpenFile(string filePath)
{
try
{
File.Open(path);
}
catch (FileNotFoundException ex)
{
Console.WriteLine("The specified file path not found, please enter another path.");
PromptUserForAnotherFilePath();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment