Author Archives: compitionpoint - Page 30
Passing Arguments by Reference
Arguments can be passed by reference. That simply means that we are passing the address of the variable and not its value. Pass by reference is useful when you are…
Parameters and Arguments
Parameters give a method something to play with. They are like raw information that the method will process to give you the data you are looking ; Imagine parameters as information you…
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…