Creating and Using Multifile Assemblies
page 6 of 7
by J. Ambrose Little
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33452/ 105

Quick Example

In order to quickly demonstrate how to use a multifile assembly, I created a C# console project called Tester.  This application simply creates two DateTime objects, sets one of them to System.DateTime.Now and the second to be that plus three days (using the AddDays method).  It then uses the one method from our VBLibrary module (called DayDiff), which uses Microsoft.VisualBasic.DateDiff to return the difference in days between the two dates (which as we know will be 3).  Finally, it writes to the console the difference (3) and what that would be encrypted as using the default encryption method (Encrypt) from the C# module's Cryptography class.  So the output of the application is (and will always be) what is in Figure 6.  The point, again, was simply to demonstrate that all you need to do is reference the main assembly file (containing the assembly manifest), and then you can use all of the types from both projects as if they were part of one single-file assembly.

Figure 6

View Entire Article

User Comments

Title: very good article and explanantion   
Name: Jon
Date: 2005-08-12 12:18:56 AM
I don't use Visual Studio for .net development, so this is excellent information for my work.

Title: fd   
Name: sp
Date: 2005-07-06 7:08:13 AM
Title: Good quick explanation of the al   
Name: Tom
Date: 2004-09-28 1:06:37 PM
I was looking for a quick explanation of the assembly linker and I found this through a search on the web. It was concise and well written. Thanks.

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-18 10:29:09 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search