1.4 Referencing Assemblies and Namespaces

 <  Day Day Up  >  

You want to use a class, but the compiler says that the class cannot be found.


Technique

Add a reference to the assembly that defines the class by clicking on the Project, Add Reference from the main menu. Select the .NET tab, locate the assembly that contains the type you want to use, and double-click it.

Comments

The .NET Framework uses information in an assembly to resolve type information when you want to use a class. An assembly is simply the file that is created when you compile a project such as an .exe or dynamic link library ( .dll ) file. When you perform the steps of referencing an assembly, the compiler knows to look in each referenced assembly during compilation to resolve any types that are encountered within the source file.

 <  Day Day Up  >  


Microsoft Visual C# .Net 2003
Microsoft Visual C *. NET 2003 development skills Daquan
ISBN: 7508427505
EAN: 2147483647
Year: 2003
Pages: 440

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net