它在事件处理程序中显示错误 [英] it showing error in event Handler
本文介绍了它在事件处理程序中显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的弟弟,
i想要在C#web表单中创建计时器当我写这个
dear Brother,
i want create timer in C# web Form when i write this
myTimer.Tick += new EventHandler(myTimer_Tick);
错误:system.timers.timer不包含定义for Tick and no extension方法'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,,,,
推荐答案
问题是计时器
您使用的是没有Tick事件
。就像错误信息所说的那样......
你可能会想到一个 System.Windows.Forms.Timer [ ^ ]确实有一个Tick事件
。
你是使用 System.Timers.Timer [< a href =http://msdn.microsoft.com/en-us/library/system.timers.timer(v=vs.110).aspx\"target =_ blanktitle =New Window> ^ ]或 System.Threading.Timer [ ^ ],其中没有勾选活动
。
阅读MSDN页面,了解您需要的计时器
以及如何使用e it。
这是另一篇比较计时器
的文章:比较.NET Framework类库中的Timer类 [ ^ ]。
祝你好运:)
The problem is that theTimer
you are using does not have aTick Event
. Pretty much as the error message says...
You're probably thinking of a System.Windows.Forms.Timer[^] which does have aTick Event
.
And you're using either System.Timers.Timer[^] or System.Threading.Timer[^], which don't haveTick Events
.
Read the MSDN pages to find out whatTimer
you need and how to use it.
Here is another article comparingTimers
: Comparing the Timer Classes in the .NET Framework Class Library[^].
Good luck :)
check < a href =http://www.codeproject.com/Questions/264014/Timer-Tick-not-recognized> Timer.Tick无法识别 [ ^ ]
check Timer.Tick not recognized[^]
这篇关于它在事件处理程序中显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文