开发者

How to get other system's time using network programming in C#?

I want to get another system's time which开发者_运维问答 is a server where both systems are connected through LAN. Give me some ideas?


Check this out: An SNTP Client in C#

Or, for the REALLY simple solution, shell out to NET TIME

net time \\computer

And capture the stdout.


If the server is a windows operating system, you could try to get the time remotely using WMI


A more recent project SNTP time class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜