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 / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

Attributes and events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edward Diener - 30 Jul 2005 17:59 GMT
One can specify an event as either the raw event:

__event System::EventHandler * OnSomethingChanged;

or as a series of add_,remove_, and raise_ methods:

__event virtual void remove_OnSomethingChanged(System::EventHandler *);
__event virtual void add_OnSomethingChanged(System::EventHandler *);
__event virtual void raise_OnSomethingChanged(System::Object,
*System::EventHandler *);

In the latter case, when creating an attribute for the event, ie.
[System::ComponentModel::DescriptionAttribute("Something Changed")] , is it
sufficient to specify it before any one of the __event member functions, or must
one repeat the attribute for all ?
Atul - 31 Jul 2005 16:24 GMT
In the case of properties, applying to any of the get_ or set_ works, so I
guess the same should hold true for events as well.

- Atul
Sky Software http://www.ssware.com/
Shell MegaPack ActiveX & .Net
Drop-In Windows Explorer-Like Shell Browsing UI for your apps.

> One can specify an event as either the raw event:
>
[quoted text clipped - 11 lines]
> it sufficient to specify it before any one of the __event member
> functions, or must one repeat the attribute for all ?
Edward Diener - 31 Jul 2005 18:17 GMT
> In the case of properties, applying to any of the get_ or set_ works

Yes, I know.

>, so I
> guess the same should hold true for events as well.

I hope so but I was hoping someone knew for sure. Maybe no one has ever used an
attribute with the extended form of specifying events. I will assume I only need
the attribute on one of the three event methods.

> - Atul
> Sky Software http://www.ssware.com/
[quoted text clipped - 16 lines]
>>it sufficient to specify it before any one of the __event member
>>functions, or must one repeat the attribute for all ?

Rate this thread:







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.