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 toContinueContinue reading “C# – Changing the Length of an Array”
Author Archives: Deniz Karadal
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,ContinueContinue 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[]ContinueContinue 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 theContinueContinue reading “C# – Formatting Strings”
C# – Working with Spans of Time
As the beginning of the week, I want to show you ‘working with Spans of Time’ Let’s jump into topic as usual; Create and Initialize new TimeSpans //Days.Hours:Minutes:Seconds:Miliseconds Get Individual Parts …… or get TOTAL elapsed time as double representing both of number of days / hour / etc. AND fractional values representing “left overs”ContinueContinue reading “C# – Working with Spans of Time”