Returning Values from a Method
Methods can return values of any data type. These values can be used for calculations or obtaining data that the method has ; In a real life scenario, imagine that…
Methods
Methods in c# let you define a behavior or task which composed of a set of codes that you can execute anywhere in the program. methods can accept arguments which supplement…
Jagged Arrays
Jagged Arrays are multidimensional arrays containing rows of varying lengths. A simple multidimensional array is rectangular because it’s rows has the same number of columns, but jagged arrays can have different…
Multidimensional array
Multidimensional array are arrays that use more than one index to access its content. Imagine a table with rows and columns, a multidimensional array can represent its data in a way…
Foreach Loop
The foreach loop is yet another looping structure in C# which is specially designed for arrays, lists, and ;foreach loop cycles through each of the elements, placing the element’s value into a…
C# Array
C# array is a kind of variable that stores a list of addresses of variables and can store a set of data having the same data type. Declaring multiple variables…
Break and continue Statements
C# break Sometimes, you want to stop the loop even if the condition is still true. How do you do that? Well, we can use the C# break keyword to stop the loop…
C# do while Loop
The C# do while loop is another way of making your code repeat its execution. It is almost similar the while loop with one minor difference, it checks the condition after the…
While Loop
The C# while loop is the most basic looping structure in C#. It takes one condition and a set of codes that it will execute for as long as the condition remains…
Looping
Looping allows you to repeat a set of code or statements while a given condition is true. Without it, you have to write multiple similar codes just to make your program…