Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear Brother,

i want create timer in C# web Form when i write this
C#
myTimer.Tick += new EventHandler(myTimer_Tick);


ERROR : system.timers.timer dose not contain definition for Tick and no extension Method 'Tick' accepting first Argument ....

can any body Help me


thanks,,,,
Posted
Comments
[no name] 21-May-14 2:52am    
system.timers.timer does not have an event Tick. You need myTimer.Elapsed I think.

The problem is that the Timer you are using does not have a Tick Event. Pretty much as the error message says...
You're probably thinking of a System.Windows.Forms.Timer[^] which does have a Tick Event.
And you're using either System.Timers.Timer[^] or System.Threading.Timer[^], which don't have Tick Events.
Read the MSDN pages to find out what Timer you need and how to use it.
Here is another article comparing Timers: Comparing the Timer Classes in the .NET Framework Class Library[^].

Good luck :)
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900