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
  • 14,346
  • 7
  • 50
  • 58
peeles
  • 135
  • 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,421,763
  • 867
  • 9,128
  • 9,194
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,953
  • 15
  • 56
  • 78
1

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

Matt Hamilton
  • 200,371
  • 61
  • 386
  • 320