Home > Articles > Programming > C#

Using the C# system.io Namespace

  • Print
  • + Share This
Building effective C# disk I/O code isn't a simple matter, and is often overlooked or underestimated on big projects. Following a few straightforward rules, enterprise development and networking specialist Stephen B. Morris provides an on-ramp to this oft-neglected area.
Like this article? We recommend

File I/O

Interacting with files and directories is one of those areas of programming that can be both subtle and potentially difficult. Some of the important issues: simply using the API, performance, and exception handling. In the case of C#, this language provides some powerful mechanisms. Even in these days of ubiquitous databases, there's still a huge amount of data stored in disk files. In fact, IBM reckons that about 15 petabytes of data is created every day—more than the entire contents of all the libraries in the U.S. Being able to create, modify, and delete disk data is an important skill today, and is likely to remain so in the future.

On a deeper level, any form of persistent storage (including databases) is a mechanism by which data can outlive the process or application that created it. In this context, C# I/O code provides an on-demand gateway to your disk data. As you'll see in this article, there are many subtleties to effective I/O programming.

Now let's get started with an example of directory creation.

  • + Share This
  • 🔖 Save To Your Account