Blog

.NN #4: TextFieldParser Class

In the last .Net Nugget I talked about streams. One of the most common uses of streams is to read files in or write files out. I’ve written many applications that needed to read data from physical files as either a data input mechanism or to read configuration. Reading configuration these days is very nicely handled with the System.Configuration namespace objects, but there are many times we need to read in a file and parse it’s contents.

Hanselman drank the kool-aid

Looks like Scott Hanselman took a big swig of the Kool-aid and is now going to work for Microsoft. 

.NN #3: Streams

Even people very new to .Net will have run into streams (classes that derive from System.IO.Stream) in the framework. I’d think the most common usage of streams is file I/O, but it’s really just a way to handle a sequence of bytes. You can read from streams, write to streams and even seek around in them finding what you want (if the backing store supports that). You’ll find a ton of examples of stream usage throughout the framework, but why are they so useful?