Overflow Exception Handling Using Checked And Unchecked

As a C# programmer you always should be always aware of right output of arithmetic operation. Your code might be right, there is no runtime exception still your output may be wrong and it may cause important problem in your project. To understand this theory, see below programming example first. Example: using System; using System.Collections.Generic; using System.Linq; using System.Text;

Try Catch Finally In C#

Try Catch Finally is the  building block of exception handling in c#. ‘Try’ block keeps the code which may through exception at runtime. The ‘catch’ block handle the exception if try block rais error and ‘finally’ block executes always exception is raised or not. A try block may have multiple catch blocks. Example: using System; using System.Collections.Generic;

Exception Handling In C# With Programming Examples

Before starting to learn about Exception handling, it is required to know what actually Exception is and why it is required to learn exception handling. Exception means for programming error which appears at runtime. For example you have create a program in which user inputs two numbers and program divide the number and show output. Now consider what happen

Array Class And Function In C#

Array class is the base class of all the arrays in C# programming. Array class is defined within the system namespace. Array class provides number of predefined functions and properties to work with. Its function makes array much easier and simpler to work. int[] arr = new int[4]; MOST COMMON PROPERTIES OF ARRAY CLASS Properties

C# Params Array

Some conditions, you are not assured about number of parameters or you want to create a method that can accept n number of parameters at run time. This situation can be handled with params type array in C#. The params keyword creates an array at run time that receives and holds n number of parameters. static