TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
srinath
NA
144
0
events
Sep 8 2009 6:16 AM
Hi,
I am trying events and delegates in my program on google search I came to see one code snippet. I couldn't get that in to which variable the output is going. Please help me..
public
delegate
void
NumberArgumentHandle
(
object
sender,
NumberArgs
args);
public
event
NumberArgumentHandle
NumberSelected
{
add
{
Events.AddHandler(key,
value
);
}
remove
{
Events.RemoveHandler(key,
value
);
}
}
double
x =
double
.MaxValue;
double
.TryParse((sender
as
Button
).Text,
out
x);
if
(x !=
double
.MaxValue)
{
NumberArgs
args =
new
NumberArgs
(
Convert
.ToDouble((sender
as
Button
).Text));
RaiseEvent(args);
}
public
class
NumberArgs
:
EventArgs
{
double
number =
double
.MaxValue;
public
NumberArgs(
double
number)
{
this
.number = number;
}
public
double
Number
{
get
{
return
number; }
}
}
Reply
Answers (
4
)
Image comparison (need to resize, convert to binary and compare similar image result)
how to load config file dynamically