.Net Framework 4.0 new features

vs2010 logo .Net Framework 4.0 new features.Net Framework 4.0 adds also some new and cool features to file system objects. File class has now ReadLines() methods that returns IEnumerable. WriteAllLines() methods has two overload methods that accept IEnumerable instead of strings array that was also supported in previous versions of .Net Framework. This posting introduces ReadLines() and WriteAllLines() methods and gives you some ideas how to use these methods in your applications.

Also the new .Net Framework 4.0 Beta 2 has new IsNullOrWhiteSpace() method for strings generalizes IsNullOrEmpty() method to incluse also other white space besides empty string. In this posting I will show you simple example that illustrates how to use IsNullOrWhiteSpace() method.

.Net Framework 4.0 Beta 2 introduces new class in System.Numerics namespace: Complex. Complex represents complex numbers and enables different arithmetic operations with complex numbers. In this posting I will show you how to use complex numbers in .Net Framework 4.0 applications.

Complex class has two constructors – one of them has no arguments and the other takes real and complex parts of complex number. Complex numbers have also properties for phase and magnitude. Let’s see the following code.

Here is a more complete list:
* Complex Number
* Location
* IObservable
* Stream.CopyTo
* Guid.TryParse, Version.TryParse, and Enum.TryParse
* Enum.HasFlag
* String.Concat and String.Join overloads that take IEnumerable
* String.IsNullOrWhiteSpace
* Environment.SpecialFolder additions
* Environment.Is64BitProcess and Environment.Is64BitOperatingSystem
* Path.Combine params support
* TimeSpan Globalized Formatting and Parsing
* Stopwatch.Restart
* StringBuilder.Clear
* IntPtr and UIntPtr Addition and Subtraction operators
* ServiceProcessInstaller.DelayedAutoStart
* ObservableCollection moved to System.dll

To read more, follow the links here and here.

To read about “Data Binding in ASP.NET AJAX 4.0” click here.

Leave a Reply

Your email address will not be published. Required fields are marked *