开发者

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

开发者 https://www.devze.com 2022-12-11 13:05 出处:网络
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#

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

精彩评论

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