How do I set the date/time of the computer in C#?
You can set the date using Microsoft.VisualBasic.Today and Microsoft.VisualBasic.TimeOfDay, although they're subject to security restrictions.
Yes, it's strange accessing the Microsoft,VisualBasic namespace, but there doesn't appear to be a C# equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With