calendar control MonthChangedEventArgs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
is there a way to convert/cast MonthChangedEventArgs to EventArgs?
thanks,
rodchar
 
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.
 
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
 
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>
 
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>
 
Back
Top