2025유니티수업

0610 C#(일반화 자료형 T, Dictionary, try catch 예외처리)

버스창문 2025. 6. 10. 11:45

1. int로 자료형 지정했지만 string과 double 대입 시도 / 2. string, string

 

 

try
            {
         for(int i = 0; i<11 ; i++)
Console.WriteLine(arr[i]);
            }
            catch(IndexOutOfRangeException err)
            {
                Console.WriteLine("에러");
            }