PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Strange Behavior with MenuItem Click Event
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Strange Behavior with MenuItem Click Event
![]() |
Strange Behavior with MenuItem Click Event |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a handler for a MenuItem.Click event. I expected the sender
parameter to be a _reference_ to the actual menu item I added, but the GetHashCode() method applied to the item I add and again to the sender object return different values. Can anyone confirm if this behavior is by design, and if so, shed some light on why it's implemented this way. In my work with delegates, I've always assumed they were references, so I need to know if/when this is not the case. Thanks, Marvin |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

