Finally1 [C#][Study][기초다지기] 예외처리 예외처리 - try : 예외를 일으킬 수 있는 코드 식별 - catch : 예외처리 - throw : 사용자 정의 예외 메시지 생성 - finally : 예외 발생 여부에 관계없이 실행 [ex] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Exception_Handling { class Program { static void Main(string[] args) { label: // Try block: 런타임에 발생하는 예외를 확인한다. try { int num1, num2; decimal result; Console.Write.. 2023. 9. 23. 이전 1 다음