calendar control MonthChangedEventArgs

G

Guest

hey all,
is there a way to convert/cast MonthChangedEventArgs to EventArgs?
thanks,
rodchar
 
N

Nicholas Paldino [.NET/C# MVP]

rodchar,

You don't have to do anything to cast it. Since MonthChangedEventArgs
derives from EventArgs, you can assign an instance of MonthChangedEventArgs
to an EventArgs variable without a cast.
 
A

Alex Meleta

Hi rodchar,

But what a reason? EventArgs doesn't have useful information. Using EventArgs.Empty
instead.

Regards, Alex
[TechBlog] http://devkids.blogspot.com



r> hey all,
r> is there a way to convert/cast MonthChangedEventArgs to EventArgs?
r> thanks,
r> rodchar
 
A

Alex Meleta

Hi Nicholas,

Just to precise: if rodchar said about web MonthChangedEventArgs (http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.monthchangedeventargs.aspx)
then it is not derived from EventArgs, or we are talking about something
else? :)

Regards, Alex
[TechBlog] http://devkids.blogspot.com



N> rodchar,
N>
N> You don't have to do anything to cast it. Since
N> MonthChangedEventArgs derives from EventArgs, you can assign an
N> instance of MonthChangedEventArgs to an EventArgs variable without a
N> cast.
N>
N> N>
 
N

Nicholas Paldino [.NET/C# MVP]

Unngh, it pains me to see this. The class should be derived from
EventArgs. This is obviously an oversight.

There is a bug listed in the community connect site for this already:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=98320

And I've updated the community content section of the documentation to
point to it:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.monthchangedeventargs.aspx

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Alex Meleta said:
Hi Nicholas,

Just to precise: if rodchar said about web MonthChangedEventArgs
(http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.monthchangedeventargs.aspx)
then it is not derived from EventArgs, or we are talking about something
else? :)

Regards, Alex
[TechBlog] http://devkids.blogspot.com



N> rodchar,
N> N> You don't have to do anything to cast it. Since
N> MonthChangedEventArgs derives from EventArgs, you can assign an
N> instance of MonthChangedEventArgs to an EventArgs variable without a
N> cast.
N> N>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top