Extending objects from separate assembly


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Extending objects from separate assembly

  1. #1
    Join Date
    Aug 2006
    Location
    Arkansas
    Posts
    24

    Extending objects from separate assembly

    Suppose you want to extend a class contained within an assembly that is used by an executable from within the same directory, but you wish to do so without re-compiling or rewriting the original assembly or executable. The original assembly doesn't have a strong name and is not in the global assembly cache. Is there any way this is possible? It would be similar to extending a COM object, just that we are using .NET.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    As long as the class in the assembly is not sealed (NotInheritable in VB), you can simply add a reference to the assembly in your project, then extend the class as you normally would:
    Code:
    Public MyClass
        Inherits ClassNameInAssembly
    
    End Class
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2007, 02:54 PM
  2. Problem loading an assembly
    By mjtech in forum .NET
    Replies: 3
    Last Post: 03-29-2006, 08:01 PM
  3. Extending Validation Objects
    By hoyaabanks in forum ASP.NET
    Replies: 1
    Last Post: 08-11-2005, 06:52 PM
  4. RC1 Assembly Reference Problem
    By Matteo Garutti in forum .NET
    Replies: 0
    Last Post: 11-14-2001, 03:48 AM
  5. Thin Objects for Better Performance
    By Dave Fleischman in forum Enterprise
    Replies: 3
    Last Post: 08-18-2000, 01:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center