This article introduces and describes streams and their properties, version information, methods, syntax and so on with examples. In this article I also describe the file class and directory class.

Stream | Introduction

We can perform two operations on a file:

These operations can be performed across the network, over the internet or anywhere else depending on you. But the data you do process must be streamed.

Stream Class

Stream Class

Stream Data

Stream data can be stored or forwarded over the network via these three backing stores or we can call it backup of the streamed data.
These backing stores are:

Stream Data

Properties | Streams

Properties

Stream | Hierarchy
Stream

Syntax

Here is some syntax for the Stream class:
Syntax

Methods

There are several methods used in the Stream class, some of them am presented here. For more details you can go to msdn.channel9.
Methods

Version Information
Version Information

Inheritance Hierarchy

You can also go through these:
Inheritance Hierarchy

Example

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

namespace Hello_Word

{

class Struct

{

public struct Point

{

private int xCord;

private int yCord;

public Point(int x, int y)

{

xCord = x;

yCord = y;

}

public int x

{

get { return xCord; }

set { xCord = value; }

}

public int y

{

get { return xCord; }

set { xCord = value; }

}

}

}

File Classes

The System.IO namespace provides functionality for file classes.

Working with Classes

There are generally 3 types of file classes provided by the System.IO namespace in C# and they are as follows:

Working with Classes

Directory Classes

Directory Classes