Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2005

Tip: Looking for answers? Try searching our database.

Does delegate instantiate an instance of Delegate or MultiCastDele

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nima - 30 Sep 2005 02:58 GMT
The documentation for the Delegate and the MultiCastDelegate classes tell me
that when we have a line like:

public delegate void CheckAndPrintDelegate(string str);

it causes the compiler to generate a new delegate class named
CheckAndPrintDelegate that inherits from System.MulticastDelegate.

Elsewhere it says the same delegate definition produces a delegate class
inheriting from System.Delegate.

Under what condition does this construct create an instance of
System.Delegate and under what condition does it create an instance of
System.MulticastDelegate?

Thanks

Nima Dilmaghani
Abubakar - 30 Sep 2005 08:19 GMT
Hi,
the complete explanation to your question is this :
http://209.34.241.67/brada/archive/2004/2/5.aspx. You see there that we can
never inherit from system.delegate directly. Since Brad said that we should
pretend that only multicastdelegate exists so this means that always an
instance of multicastdelegate is created for us, & because its internally
inheriting from system.delegate so while wrting it would be valid to say that
its an instance of system.delegate, but its actually system.multicastdelegate.

Regards,

Abubakar.
http://joehacker.blogspot.com

> The documentation for the Delegate and the MultiCastDelegate classes tell me
> that when we have a line like:
[quoted text clipped - 14 lines]
>
> Nima Dilmaghani
Nima - 30 Sep 2005 20:00 GMT
Thanks Abubakar.  It is now clear.

> Hi,
> the complete explanation to your question is this :
[quoted text clipped - 28 lines]
> >
> > Nima Dilmaghani

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.