BlackWaspTM

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 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ... | Next >> |
Calculating Prime Factors in C#Calculating Prime Factors in C#
The prime factors of a number are all of the prime numbers that can be divided into the number without a remainder. In this article, we will create a method that uses direct search factorisation to generate the list of prime factors for a given value.
Convert Roman Numerals into NumbersConvert Roman Numerals into Numbers
In an earlier article we converted integer values into Roman numerals, an ancient numbering system that uses letters to represent values. In this article we will reverse the process, allowing Roman numerals to be evaluated as an integer.
Binary SerializationBinary Serialization
A standard problem with object-oriented languages is that of persisting object state. Binary serialization allows single objects or complex models to be converted to binary streams, which may be stored in files or transported to other systems.
C# Logical Operator OverloadingC# Logical Operator Overloading
The tenth article in the C# Object-Oriented Programming tutorial continues the discussion of operator overloading. In this article, the overloading of the logical operators is described including how to enable the short-circuit Boolean logical operators.
Implementing IDisposableImplementing IDisposable
Classes that use unmanaged resources, or that hold references to managed objects that themselves use unmanaged resources, should always implement the IDisposable interface. The correct use of this interface ensures the efficient release of resources.
Combining ArraysCombining Arrays
A common requirement when developing software is to combine several arrays. This article explains the process of copying two arrays into a third, larger structure. This process can be extended to join together the contents of any number of arrays.
C# Optional ParametersC# Optional Parameters
C# 4.0 introduces optional parameters to the language for methods, constructors, indexers and delegates. Optional arguments can be defined within a member's signature but omitted from calls to that member, in which case default values are used instead.
Using Extension Methods with EnumerationsUsing Extension Methods with Enumerations
Extension methods were introduced in .NET 3.5 to allow classes to be apparently extended without modifying the class's code or using inheritance. Extension methods can also be used to add extra behaviour to enumerations.
LINQ Style Append and Prepend OperatorsLINQ Style Append and Prepend Operators
Integrated Query (LINQ) includes a standard query operator to concatenate two sequences of the same type, but nothing to append or prepend a single item to a collection. However, these useful methods are simple to create.
A LINQ Style Replace OperatorA LINQ Style Replace Operator
It can be useful to search a sequence of items for a specific value or object and replace all matching instances with a new value. Language-Integrated Query (LINQ) does not provide a standard query operator for this purpose but creating one is simple.
<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ... | Next >> |