New features of c# framework 4.0
1]Dynamic:Now you can create dynamic objects and let their types be determined at run time.
2]Covariance and Contravariance:Variance on generic type parameters in interfaces and delegates is another important feature of this release. It doesn’t add much new functionality, but rather makes things work as you expected them to in the first place. The major advantage is hidden in this simple line, which didn’t compile until C# 4.0
3]Optional (or Default) Parameters:Now you can assign a default value to a parameter right within the method declaration. The user of the method can either pass a value or simply skip the argument. In the latter case, the default value is passed to the method.
4]Named Arguments:The order of parameters in a method declaration and the order of arguments you pass when calling the method don’t need to match anymore. You can provide arguments in any order you like by specifying parameter names in a method call. This might also improve the readability of your code.
5]Improved COM Interop:The introduction of the dynamic keyword, optional parameters and named arguments enables improvement of COM interop.
Here are some links for further reading:
"Please give me your valuable comments to improve my knowledge :) "
2]Covariance and Contravariance:Variance on generic type parameters in interfaces and delegates is another important feature of this release. It doesn’t add much new functionality, but rather makes things work as you expected them to in the first place. The major advantage is hidden in this simple line, which didn’t compile until C# 4.0
3]Optional (or Default) Parameters:Now you can assign a default value to a parameter right within the method declaration. The user of the method can either pass a value or simply skip the argument. In the latter case, the default value is passed to the method.
4]Named Arguments:The order of parameters in a method declaration and the order of arguments you pass when calling the method don’t need to match anymore. You can provide arguments in any order you like by specifying parameter names in a method call. This might also improve the readability of your code.
5]Improved COM Interop:The introduction of the dynamic keyword, optional parameters and named arguments enables improvement of COM interop.
Here are some links for further reading:
- Find all calls to and from your methods with the new Call Hierarchy window.
- Even if you have never heard of test-driven development (TDD), the Generate From Usage feature may help you to quickly prototype your application by generating method and class stubs, allowing you to concentrate on your current task rather than worrying about declarations. For TDD adepts, this feature might be a real performance booster. Check out this walkthrough for more details.
- Don’t forget to take a look at What’s New in the .NET Framework 4 and also at What’s New in Visual C# 2010 (just to make sure I didn’t miss something).
- And just in case, check out breaking changes for C# and .NET Framework.
- Last, but not least, don’t forget to report any problems at Microsoft Connect.
"Please give me your valuable comments to improve my knowledge :) "
No comments:
Post a Comment