运行 ❯
获取您自己的 C# 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
using System; namespace MyApplication { class Program { static void Main(string[] args) { try { int[] myNumbers = {1, 2, 3}; Console.WriteLine(myNumbers[10]); } catch (Exception e) { Console.WriteLine("Something went wrong."); } finally { Console.WriteLine("The 'try catch' is finished."); } } } }
发生了错误。
The 'try catch' is finished.