Is it possible to replace the if-else block with a try-catch block as follows?
String updateScriptPath = compileUpdateScript(inputVersion, searchPath); if (updateScriptPath == null) { Console.WriteLine(" No update sripts found :( "); } else { Console.WriteLine(updateScriptPath); } String updateScriptPath = compileUpdateScript(inputVersion, searchPath); try { Console.WriteLine(updateScriptPath); } catch { Console.WriteLine(" No scripts found :( "); }
nulltoConsole.WriteLinean exception occurs? - Igor