Storing Multiple Modules in an Assembly

Assemblies can contain several modules, and we're going to create a multi-module assembly next. An assembly includes a hash code for each module, which is a numeric representation of the module's code used for version verification. The Visual Studio IDE can't create multi-module assemblies for C#, although it can for C++, so we're going to use the command-line compiler, csc, in this example.

This example shows how to link several modules into the same assembly. In this case, we're going to define a string-handling class, ch13_02, in one module, and use it in another. In ch13_02.cs, we'll define the ch13_02 class in a namespace called MultiModule and give that class a property named Text that will hold a ...

Get Microsoft® Visual C#® .NET 2003 Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.