C#第六天异常

namespace gowater 
{
    class Program {
        static void Main()
        {
			try
			{

			}
			catch (Exception)
			{

				throw;
			}
        }
    }
}

  

namespace gowater 
{
    class Program {
        static void Main()
        {
			try
			{
				int[] arr = { 1, 2, 3 };
				Console.WriteLine(arr[3]);
			}
			catch (Exception e)
			{
                Console.WriteLine(e.Message);
				throw;
			}
        }
    }
}

  

posted @ 2026-08-05 17:21  华腾智算  阅读(2)  评论(0)    收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL