C# – Looping with the For Iteration Statement

If you ever in Visual Studio, write down ‘for’ and tip two times ‘tab’ on keyboard, you will be seeing that for Iteration statement would be created for you. i – any variable name 1st part – counter declaration, can be initialized to any number 2nd part – condition, can be any expression that equatesContinue reading “C# – Looping with the For Iteration Statement”

C# – Changing the Length of an Array

We continue with array. This time how we change the length of an array. Arrays are immutable = cannot be changed in memory. However .Net Framework providers helper methods to resize an array… creates a new array and copies the old values into it. //Get the highest index: // 0 = dimension we want toContinue reading “C# – Changing the Length of an Array”

C# – Multi Dimensional Arrays

It is same as single dimensional arrays. just requires more indexes (in dimensions) to get to the element.   Here is again some more info from microsoft.com Arrays can have more than one dimension. For example, the following declaration creates a two-dimensional array of four rows and two columns. C# int[,] array = new int[4,Continue reading “C# – Multi Dimensional Arrays”

C# – Single Dimensional Array

Today we will explore in brief single dimensional array; Index vs. Elements Accessor vs. Stored Values Indexes are zero based Declaring Arrays Declaring and Initializing Arrays Setting / Getting Values As usual, a bit detailed explanation from microsoft.com You can declare a single-dimensional array of five integers as shown in the following example: C# int[]Continue reading “C# – Single Dimensional Array”

C# – Formatting Strings

Today, a topic which is mostly neglected from many of us. Here it is Concenate strings + += Format Strings  Format Numbers Tue, 15, 09, 1988 Formatting Currency 5.000 € Here is again detail information from microsoft.com Standard numeric format strings are used to format common numeric types. A standard numeric format string takes theContinue reading “C# – Formatting Strings”