TechBubbles

.NET Framework 4 File IO Features

New methods are added to the System.IO.File class in .NET framework 4.0 for reading and writing text files.

ReadLines

In earlier version we have used File.ReadAllLines method which returns a string array of all lines in the file.

String[] lines = File.ReadAllLines(“file.txt”);

Read more

Related Posts:

1 comment

.NET Framework 4 BCL

All .NET developers who uses the BaseClassLibraries can read this post to know what’s New in the .NET FW 4 BCL.  Its not the scope of this post to cover all the features but you can read them on BCL team blog at blogs.msdn.com/bclteam.

The following are the features that you can explore in BCL

  • Code Contracts
  • Parallel extensions
  • Tuples
  • File IO improvements
  • Memory mapped files
  • Sorted Set Collection

Code Contracts

One of the major features added to the .NET FW BCL in version 4 is code contracts. Classes and methods should explicitly state that what they require and what they guarantee if those requirements are met, i.e. their contracts.

Read more

Related Posts:

2 comments

WCF Features in .NET Framework 4.0

Introduction

WCF providing a way to define service contracts and to configure endpoint definitions using the declarative XAML in .NET Framework 4.0.

Consider the WCF service contract definition:

IcalService

Read more

Related Posts:

No comments