background preloader

C# Language Features

Facebook Twitter

The C5 Generic Collection Library for C# and CLI. The C5 Generic Collection Library C5 is a library of generic collection classes for C# and other CLI languages and works with Microsoft .Net version 2.0 and later, and Mono version 2 and later.

The C5 Generic Collection Library for C# and CLI

C5 provides functionality and data structures not provided by the standard .Net System.Collections.Generic namespace, such as persistent tree data structures, heap based priority queues, hash indexed array lists and linked lists, and events on collection changes. Also, it is more comprehensive than collection class libraries on other similar platforms, such as Java.

Dynamic Typing

Expression Trees. .net - Remove C# attribute of a property dynamically. Dynamic Objects. Dynamic Compilation. Out (Generic Modifier) (C# Reference) For generic type parameters, the out keyword specifies that the type parameter is covariant.

out (Generic Modifier) (C# Reference)

You can use the out keyword in generic interfaces and delegates. Covariance enables you to use a more derived type than that specified by the generic parameter. This allows for implicit conversion of classes that implement variant interfaces and implicit conversion of delegate types. Covariance and contravariance are supported for reference types, but they are not supported for value types. An interface that has a covariant type parameter enables its methods to return more derived types than those specified by the type parameter.