473,289 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

EventArgs( ) in customEventArgs( )

Hi,

When we create customEventArgs, we derive the classes from
eventArgs( ) and I dont understand the advantage of this inheritance.
This is neither an interface nor applied as attribute.

I have seen similar stuff in remoting also where we derive from
marshallByRef object in SAO to create transparent proxy. How it
creates transparent proxy just by inheriting from base class.?

If you know the reason, please let me know.

Thank You

Sujith
Jul 21 '05 #1
1 1352

"Sujith Jagini" <sk******@rediffmail.com> wrote in message
news:b7**************************@posting.google.c om...
When we create customEventArgs, we derive the classes from
eventArgs( ) and I dont understand the advantage of this inheritance.
This is neither an interface nor applied as attribute.
Consistency. It's similar how in order to throw a custom exception it has to
be a class derived from System.Exception. In the case of EventArgs there's
no rule however - you're more than free to define your own classes for your
custom events or functions.
I have seen similar stuff in remoting also where we derive from
marshallByRef object in SAO to create transparent proxy. How it
creates transparent proxy just by inheriting from base class.?


Because it inherits from a class that already contains all the necessary
functionality.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
4
by: Eric Cadwell | last post by:
What advantages do I reap by following the EventArgs pattern in defining custom event delegates? For example... public delegate void CustomEventHandler(object sender, CustomEventArgs e);...
2
by: ZAky | last post by:
Why do I get a System.NullReferenceException for this script? I added the following script to a simple form with a button. <Script> public event EventHandler DoThis; static void Main() {...
1
by: Jack Addington | last post by:
I have a 3rd party object that fires an itemchanged event when someone edits some data on a form. This event has a custom eventArgs that has a field called ActionCode. In the code of the event,...
0
by: Sujith Jagini | last post by:
Hi, When we create customEventArgs, we also derive the classes from eventArgs( ) and I dont understand the advantage of this inheritance. This is neither an interface nor applied as attribute. ...
0
by: Sujith Jagini | last post by:
Hi, When we create customEventArgs, we derive the classes from eventArgs( ) and I dont understand the advantage of this inheritance. This is neither an interface nor applied as attribute. I...
1
by: Sujith Jagini | last post by:
Hi, When we create customEventArgs, we also derive the classes from eventArgs( ) and I dont understand the advantage of this inheritance. This is neither an interface nor applied as attribute. ...
1
by: Sujith Jagini | last post by:
Hi, When we create customEventArgs, we derive the classes from eventArgs( ) and I dont understand the advantage of this inheritance. This is neither an interface nor applied as attribute. I...
2
by: Bob | last post by:
Hi, I'm still new to asp.net and i would like to understand this: "Source As Object, e As EventArgs" <script runat="server"> Sub button1(Source As Object, e As EventArgs) p1.InnerHtml="You...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.