concept class library in category .net

appears as: class library, class libraries
IronPython in Action

This is an excerpt from Manning's book IronPython in Action.

After creating the class library, preferably with a sensible name, you need to add a form to it. If you right-click the project in the Solution Explorer, you should see the menus shown in figure 6.6, and be able to add a form.

Listing 12.17. Compiling the C# proxy into a class library with csc.exe (the C# compiler)
C:\Temp> csc.exe /target:library MathService.cs Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727 Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

Creating class libraries with Visual Studio and using them from IronPython is something we’ve already looked at. In chapter 6 we used the Visual Studio Windows Forms designer to create a dialog as a C# class library and then imported it from IronPython. In this chapter we take this further and look at writing class libraries in C# or VB.NET for use from IronPython. Specifically you’ll be learning how to expose Python-friendly APIs from our .NET classes and even making them behave like dynamic Python objects. We finish off by dynamically compiling and using these class libraries at runtime.