473,326 Members | 2,102 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,326 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 1353

"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...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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...
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.