C#
C# (see section on name, pronunciation) is an object-oriented programming language developed by Microsoft as part of the .NET initiative and later approved as a standard by ECMA (ECMA-334) and ISO (ISO/IEC 23270).
Application
Computer Science
Remove
Platform
Any
License
Any
A 14-part series of articles describing the use of automated unit testing techniques for the C# programmer. The tutorial includes the use of NUnit and Moq but is also relevant for other testing...
When serializing classes to XML, each public property and field value is transformed into an XML element. The name of the element matches the name of the property. The XmlElement attribute allows the...
Every XML document includes a root element that contains all of the other information held. When serializing objects to XML the root element's construction is linked to the name of the class or...
Two integer values are said to be coprime, or relatively prime, when they share no common divisors other than the number one. This article describes the process for determining whether two positive...
Euclid'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...
Pick a random element in a C# list based on the probability of each element.
Inversion of control (IoC) containers provide a specialised form of the service locator pattern that simplifies the way in which dependencies are registered and later resolved. This article describes...
The service locator pattern is a design pattern that is used to decouple a class from its dependencies. Rather than the dependant class instantiating its dependencies directly, they are requested...
Dependency injection is a technique used in object-oriented programming languages. It promotes loose coupling of components by passing dependencies to an object, rather than having an object...
The 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...
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...
The .NET framework versions 2.0 and later support the use of generic programming, allowing greater reuse of code with classes and members that can be created without specifying the types that they...
An optimal algorithm to sort five objects in C#.
Cultural 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...
Simple algorithm to convert doubles to fractions in C#