A Primer to (Named) Pipes

To reinforce your knowledge of streams acquired in the previous section, let’s explore another System.IO capability that was added a few .NET Framework versions ago: (named) pipes. The concept of a named pipe is to provide an efficient interprocess communication mechanism that’s natively supported by the operating system. Although you won’t likely use such a low-level mechanism—in favor of higher abstraction levels as provided by Windows Communication Foundation (WCF), for example—it acts as a good sample of working with streams.

A total of five Stream subclasses exist in the System.IO.Pipes namespace, one of which acts as an intermediate base class for the other four. Let’s not go into too much detail about the additional ...

Get C# 5.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.