{ int result = 0; result = number1 + number2; Console.WriteLine(result); } static void Main(string[] args) { Program usingdelegate = new Program(); usingdelegate.CallDelegate += new SumDelegate(Program.Sum); usingdelegate.CallDelegate(20, 30); Console.ReadLine(); } } } Output: PRACTICAL NO :-2(iv) ***************************************************************************** NAME :- ROLL NO:- ***************************************************************************** Aim : Program with different features of C# iv) Exception handling : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { Program { static void Main(string[] args) { int number = 0; int div = 0; try { div = 100 / number;
{ int result = 0; result = number1 + number2; Console.WriteLine(result); } static void Main(string[] args) { Program usingdelegate = new Program(); usingdelegate.CallDelegate += new SumDelegate(Program.Sum); usingdelegate.CallDelegate(20, 30); Console.ReadLine(); } } } Output: PRACTICAL NO :-2(iv) ***************************************************************************** NAME :- ROLL NO:- ***************************************************************************** Aim : Program with different features of C# iv) Exception handling : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { Program { static void Main(string[] args) { int number = 0; int div = 0; try { div = 100 / number;
asp.net__final_doc.docx