This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / .NET namespace "System.Timer" not found
-fenix(人迹罕至);
2002-10-14
{559}
(#797879@0)
-
我猜你应该用 using System.Threading; 而不是 using System.Timer;
-lazycod(飞鹰战士);
2002-10-14
(#797882@0)
-
Thanks for your quick response! But I'm really need to reference to System.Timers (sorry for my previous misspelling).I'm working on a "Windows Service" component, in which a timer (System.Timers.Timer) must be instanciated to poll some data from the system constantly. The service is so simple that only one thread is enough. So no need to manipulate the default threading environment. Even I should use System.Threading, I couldn't reference to it --- no file has such naming pattern as "System.T*.dll" in my machine.
By the way, could you find the file in your machine?
Thanks,
fenix
-fenix(人迹罕至);
2002-10-14
{479}
(#797898@0)
-
Timer class 包含在 System.Threading namespace 中。 Mscorlib.dll 是需要的 dll. 但一般不用制定,因为它是 .NET 的最基本组件之一。
-lazycod(飞鹰战士);
2002-10-14
(#797915@0)
-
According to MSDN, "System.Timers.Timer" is another class different from "System.Threading.Timer". I think in my case I should use the prior one. Shouldn't I? Thx,
-fenix(人迹罕至);
2002-10-14
(#797923@0)
-
看来我误解了。 我查了一下,System.Timers.Timer 应该引用 System.dll.
-lazycod(飞鹰战士);
2002-10-14
(#797933@0)
-
You're right! I found it in "System.dll". Salute :)
-fenix(人迹罕至);
2002-10-15
(#797945@0)
-
Mscorlib.dll 包含 System.Threading namespace. Mscorlib.dll 是 .NET 的基本组件之一。
-lazycod(飞鹰战士);
2002-10-14
(#797885@0)