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
Sam
NA
166
0
Error: No overload for
matches delegate 'System.EventHandler'
Nov 15 2010 12:09 PM
Hello fellows,
I keep getting the error:
"No overload for
'
comPort1_DataReceived
'
matches delegate
'
System.EventHandler
'
"
Anyone knows what
'
s wrong?
Thanks.
I have 2 methods reading from 2 serial ports.
I wish to have a watchdog timer that will activate the other port if a port does not get data within certain time.
(Normally, if data was received, it will reset the timer for each data cycle. If the timer does not resets (Stop) within certain time (no data), we open the other port).
Here is what I have: (in general terms...)
System.Windows.Forms.
Timer
wait=
new
System.Windows.Forms.
Timer
();
private
void
comPort1_DataReceived(
object
sender,
SerialDataReceivedEventArgs
e)
{
//some code
}
public
void
comPort2_DataReceived(
object
sender,
SerialDataReceivedEventArgs
e)
{
if wait.Interval> {do something}
wait.Tick +=
new
EventHandler
(comPort1_DataReceived);
wait.Interval = 500;
wait.Start();
// Code
wait.Stop();
}
Reply
Answers (
1
)
Can somebody please translate this peice of code?
How to change text color in c#