Referencing External Assemblies
Next, let’s examine how to compile an application that makes use of types defined in a separate
.NET assembly. Speaking of which, just in case you are wondering how the C# compiler understood
your reference to the System.Console type, recall from Chapter 1 that mscorlib.dll is automatically
referenced during the compilation process (if for some strange reason you wish to disable this
behavior, you may specify the /nostdlib option of csc.exe).
Let’s update the TestApp application to display a Windows Forms message box. Open your
TestApp.cs file and modify it as follows:
using System;
Do'stlaringiz bilan baham: |