My C# Wishlist

Below are a few things that I wouldn’t mind seeing in the .Net framework in the future.

Intuitive “select many” in Linq query notation.

This should be self-explanatory.  Maybe throw in intuitive group and join, too.  Maybe you’ll get a bulk discount.

A “params” option for generic type constraints

This:

public delegate TResult Func<in T, out TResult>(T arg);
public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2);
public delegate TResult Func<in T1, in T2, in T3, out TResult>(T1 arg1, T2 arg2, T3 arg3);
public delegate TResult Func<in T1, in T2, in T3, in T4, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
// and so on ...

Could be something like:

public delegate TResult Func<in params T[], out TResult>(params T[] args[]);
Posted on July 31, 2013 at 3:36 pm by Steve Konves · Permalink
In: C#, Development

Leave a Reply