This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | Next >> |
 Euclid's AlgorithmEuclid's algorithm, also known as the Euclidean algorithm, can be used to efficiently calculate the greatest common divisor (GCD) for two integer values. This article describes the algorithm and provides several C# methods that calculate the GCD.
 The XOR Swap AlgorithmThe XOR Swap algorithm provides a means to swap the values in two integer variables without requiring the use of a third, temporary variable. This algorithm is interesting to know, although its use is unnecessary in high-level languages.
 Convert Text to Morse CodeMorse code is a standard encoding for letters, digits and some other characters that is ideally suited to radio transmissions and is used by amateur radio operators and pilots. This article describes a simple C# class for converting text to Morse code.
 Displaying Relative TimeWhen developing software that works with time stamped information, it is common to show the date and time at which an item was created or last updated. A user-friendly alternative is to display a relative time, such as "Two Hours Ago".
 The Soundex AlgorithmCultural differences and input errors can lead to words being spelled differently to a user's expectations. This makes it difficult to locate information quickly. The Soundex algorithm can alleviate this by assigning codes based upon the sound of words.
 Calculate the Number of Business Days in a RangeA common task is to calculate the number of business days that exist within a date range. In most western cultures, these are the days from Monday to Friday and excluding Saturdays and Sundays. The resultant number should also exclude national holidays.
 The Chaos Game and the Sierpinski TriangleThe chaos game is a method for generating fractal images by plotting randomised points inside a polygon according to a simple set of rules. In this article we will use the chaos game to generate the Sierpinski triangle using C# and Windows Forms.
 Calculating a Person's Age in YearsSometimes you will want to calculate the age of a person or of an object and return a result specifying the age in years. This calculation is simple to perform using the properties of the .NET framework's DateTime structure and basic arithmetic operators.
 Convert a Number to an Ordinal NumberOrdinal numbers represent the rank of a cardinal number, such as 1st, 2nd and 3rd. These numbers define the position or rank of a value, rather than just the size or quantity. In this article we will convert integers into English ordinal numbers.
 A Generic Read-Only DictionaryThe .NET framework includes several types of collection that are designed for use in object models. Amongst these is the ReadOnlyCollection that allows the creation of collections that may not be modified. However, there is no read-only Dictionary type.
<< Previous | 1 | 2 | 3 | Next >> |