Error!
Success!

By tag: Generics

showing:  of
0
kicks

Generic(Collection) Usage in the .NET Framework  (Unpublished)

Generics provide a way for developers to define subroutines, functions, fields, properties as well as classes, structures, interfaces and even delegates in such a way that the parameters are not of any particular type. In a sense the constructs are defined in a generic approach. The .NET Framewo...


Kicked By:
Drop Kicked By:
0
kicks

Another C# trick: Fluents, Inheritance and Extension Methods  (Unpublished)

Here’s a scenario which Damien and I encountered recently. We needed a way of specifying Facets for properties on Entities, i.e. things like Nullable, MaxLength, Precision etc. And we needed a class hierarchy because different types of properties have different sets of available facets. The...


Kicked By:
Drop Kicked By:
0
kicks

.NET Reflection - Generic Method Type Inference of a Boxed Parameter  (Unpublished)

A look into calling a generic method with a boxed parameter and returning a strongly typed, unboxed instance of that method using System.Reflection.


Kicked By:
Drop Kicked By:
0
kicks

Complex Keys In Generic Dictionary  (Unpublished)

How to work with complex keys in generic dictionary


Kicked By:
Drop Kicked By:
0
kicks

Creating Objects in C# From Stored Procedures Using Generics  (Unpublished)

How to use Generics in C# to allow you to return an array of data objects directly from a stored procedure class


Kicked By:
Drop Kicked By:
0
kicks

Func<T> based generic initializers  (Unpublished)

Here is some work I've been doing to simplify initializing List<T> using Func<T>. You can build a simple method and then instead of building a loop to initialize your object you can use a one line initialization statement.


Kicked By:
Drop Kicked By:
0
kicks

Expose New Linq Operations from the HashSet<T> Performance Monster  (Unpublished)

Linq is not just about databases. It’s about reading the registry, your hard-disk, or even a list of function pointers to be invoked. Linq is about more event then sets (collections). It’s about making tasks easier in many cases and vastly more powerful (and most importantly your code more readable ...


Kicked By:
Drop Kicked By:
0
kicks

Lists: Filter, Map and Reduce - and the Magic of IEnumerator.  (Unpublished)

There are 3 very handy list functions which make dealing with lists a breeze: Map, Filter and Reduce. But along the way of writing them, an important principle of IEnumerator<> comes up.


Kicked By:
Drop Kicked By:
0
kicks

How To Create a WPF Template For a Generic Class  (Unpublished)

Have you ever tried to create a DataTemplate for a Generic Class? Here is how you do it.


Kicked By:
Drop Kicked By:
0
kicks

Using Generics to Copy Data Between Classes of Different Types  (Unpublished)

The latest in a series of posts exploring how we can reduce the grunt work in copying data between the data layer classes and the user interface classes. This uses a fluent interface to copy all of the data in one line of code rather than property by property.


Kicked By:
Drop Kicked By:
0
kicks

Avoiding Inheritance Dependencies Using Generics and Lambdas  (Unpublished)

A nice implementation of the Command pattern using generics and lambdas


Kicked By:
Drop Kicked By:
0
kicks

The problem(s) with value types  (Unpublished)

Value types can sometimes cause unexpected behavior. This post explains one of the pitfalls you can encounter when using arrays and lists of value types.


Kicked By:
Drop Kicked By:
0
kicks

Generic types and IDisposable, the "using" trick  (Unpublished)

This is another one in the series "heck, I never thought of that"... Like most of these articles, if you already knew this trick, ignore me...


Kicked By:
Drop Kicked By:
0
kicks

A generic Dispenser class  (Unpublished)

Feeling ashamed for keeping your clients waiting until your code finally constructs your heavy classes/forms? This utility instantiates objects in a background thread and aspires to always be "full" to the capacity requested. Useful in cases the object being constructed uses many resour...


Kicked By:
Drop Kicked By:
0
kicks

Interesting generic method signature technique  (Unpublished)

A generic technique for parameter types influencing subsequent parameter types.


Kicked By:
Drop Kicked By: