답2 728x90 반응형 뇌를 자극하는 C# 5.0 프로그래밍 13장 연습문제 1~2번 답 13장에서 익힌 개념에 대해 묻는 문제들이다. 1. 출력결과가 다음과 같이 나오도록 아래의 코드에 익명 메소드를 추가하여 완성하세요.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace practice13_1{ delegate int MyDelegate(int a, int b); class Program { static void Main(string[] args) { MyDelegate Callback; Callback = delegate (int a, int b){ return a+b; }; Console.WriteLine(Callback(.. 2015. 6. 17. 뇌를 자극하는 C# 5.0 프로그래밍 12장 연습문제 1번 답 12장에서 익힌 예외처리에 대한 연습문제이다. 1. 아래의 코드를 컴파일하고 실행하면 다음과 같이 예외를 표시하고 비정상적으로 종료합니다. try ~ catch 문을 이용해서 예외를 안전하게 잡아 처리하도록 코드를 수정하세요. using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace practice12_1{ class Program { static void Main(string[] args) { int[] arr = new int[10]; for (int i = 0; i 2015. 4. 29. 이전 1 다음