Click here to Skip to main content
15,884,873 members
Articles / Programming Languages / C#

Forwarding a type from one assembly to another: TypeForwardedToAttribute

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
23 Mar 2010CPOL4 min read 30.3K   241   20  
Walkthrough: Forwarding a type from one assembly to another by using the TypeForwardedToAttribute attribute.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


/*The name space is modified from TypeForwardedToAttribute_First to TypeForwardedToAttribute_Second as 
 this is must for TypeForwarding to attribute as the  
 *Rule says:"The original type and the forwarded type must be in a same namespace."*/
namespace TypeForwardedToAttribute_First
{


    public class HouseKeeping
    {
        public void DisplayHouseKeeping()
        {
            Console.WriteLine("HouseKeeping Class from Vendor");
        }
    }

    /// <summary>
    /// Main Vendor Class
    /// </summary>
    public class Vendor
    {
        static void Main(string[] args)
        {
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
Software Professional having 8 years of experience in software development/design, requirement, testing and implementation using .NET Technologies(C#, ASP.NET,WPF,WCF,MVC), SQL Server 2005/2008, Sybase, DB2, Windows XP, 2000, Cruise Control and basic idea of Remedy.

Comments and Discussions