If you need to get date in your application and be sure, that user had no chance to manipulate with it, you can use following snippet.
//This function returns local computer time on network failure (user offline)
public DateTime GetNetworkTime()
{
return TreeksLicensingLibrary.NetworkTime.TryGetNetworkTime;
}
//This function raises an exception when user goes offline
public DateTime GetNetworkTimeUnhandled()
{
return TreeksLicensingLibrary.NetworkTime.GetNetworkTime;
}
'This function returns local computer time on network failure (user offline)
Public Function GetNetworkTime() As DateTime
Return TreeksLicensingLibrary.NetworkTime.TryGetNetworkTime
End Function
'This function raises an exception when user goes offline
Public Function GetNetworkTimeUnhandled() As DateTime
Return TreeksLicensingLibrary.NetworkTime.GetNetworkTime
End Function