473,411 Members | 2,210 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,411 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 1356

"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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.