C# Jagged Arrays

Jagged Arrays are also known as “array of arrays” that is because the elements are arrays themselves. Their dimensions and sizes may be different. Declaration of jagged array in C#. Jagged array can be declared and created in a following way. Initialization of Jagged array in C# As told above, a jagged array can be … Read more

C# Multidimensional Arrays

C# allows multi-dimensional arrays. This could be of 2D or 3D (two-dimensional or three-dimensional) Array. These arrays are stored in the form of a table (with rows and columns) which is also known as a matrix. In C#, multidimensional array is also known as rectangular arrays. To declare an array of multi-dimensions, we need to … Read more

C# Arrays

You must have learned C, C++, Java, etc and like any other programming language, an array in C# is also a group or a fixed-size sequential collection of data having the same data-type stored in a contiguous memory location. The are used to store multiple values in a single variable instead of creating multiple variable for … Read more

C# Out Parameter

This method is Passing Parameters by Output. Unlike other methods that return only a single value from the method, the Out Parameter can return multiple values from a function. They are similar to reference type, except the data are transferred out rather than into it. C# provide out keyword for the out parameter type. Example: … Read more

C# Call by Reference

Here reference refers t the addresses but not the actual value. In this method, we pass the reference of the argument to the formal parameter. To pass the parameters in C#, we have a keyword called ref. It passes a reference to a memory location rather the actual value, so the changes made to this … Read more

C# Call By Value

This is passing parameters by Value. These value-type parameters in C# copy the actual parameters to the function (known as formal parameters) rather than referencing it. Whenever a method is called by passing value, a new storage location is created for each value parameter. The copies of these values are stored, hence the changes made … Read more

C# Methods

A method refers to a block of code (or a group of statements) that performs a specific task. It takes some inputs, does some computation based on that input and returns the output. They are also known as functions. The use of function in a program helps in many ways such as reuse of code, Optimization … Read more

C# goto Statement

The goto statement is a jump statement that allows the user in the program to jump the execution control to the other part of the program. When encountered in a program, it transfers the execution flow to the labeled statement. The label (tag) is used to spot the jump statement. NOTE: Although the use of … Read more

C# continue Statement

It is a loop control statement. It is used to continue the loop in the program. The use of continue inside a loop skips the remaining code and transfer the current flow of the execution to the beginning o the loop. In case of for loop, the continue statement causes the program to jump and … Read more

C# break Statement

break statement in programming is used to come out of the loop or switch statements. It is a jump statement that breaks the control flow of the program and transfers the execution control after the loop. The use of break statements in nested loops terminates the inner loop and the control is transferred to the … Read more