0

Does anyone know what will be in .NET 4.0?

I found tuples on codeplex:

....
// NOTE : this is a TEMPORARY and a very minimalistic implementation of Tuple'2, 
// as defined in http://devdiv/sites/docs/NetFX4/CLR/Specs/Base Class Libraries/Tuple Spec.docx
// We will remove this after we move to v4 and Tuple is actually in there
public struct Tuple<TFirst, TSecond>
....
Christoffer Lette
  • 13,666
  • 7
  • 49
  • 56
peeles
  • 145
  • 4

3 Answers3

3

Parallel Extensions

WCF/WF improvements

I expect BigInteger will be back, too. I'd really like to see a bunch of the F# immutable collections become part of ".NET proper" too - and that wouldn't surprise me at all.

Jon Skeet
  • 1,335,956
  • 823
  • 8,931
  • 9,049
1

I have seen the usage of dynamic keyword in C# 4.0 from Anders Hejlsberg's JAOO talk. It allows calling methods in a late-bindish way which will really help in COM interop scenarios.

Usage:

// Instead of this:
object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember("Add", 
    BindingFlags.InvokeMethod, null,
    new int[] { 10, 20 });
int sum = Convert.ToInt32(res);

// you can write this:
dynamic calc = GetCalculator();
int sum = calc.Add(10, 20);

Static and Dynamic http://img266.imageshack.us/img266/9469/dynamicxf4.png

huseyint
  • 14,776
  • 15
  • 54
  • 78
1

Glenn Block confirmed on a recent Herding Code episode that MEF would be part of .NET 4.0.

Matt Hamilton
  • 194,622
  • 60
  • 382
  • 318