Monthly Archives: March 2017

How to disable Microsoft Compatibility Telemetry

Sometimes you might feel that your Windows 10 is really slow and busy with something unknown. When opening task manager (use for example hotkey Ctrl+Shift+Esc) you might see something like this:   Microsoft Compatibility Telemetry (CompatTelRunner.exe) is an integral part of Windows OS system.  While it is not a malevolent application, some users find it suspicious… Read More »

c# – accessig application configuration file using ConfigurationManager

Using configuration file is pretty straightforward. First  add to your application references Assembly System.Configuration. ConfigurationManager provides access to configuration files for client applications, It makes sense to encapsulate configuration settings read and write to special methods.   public static string ReadSetting(string key, string defaultValue = “Not Found”) { var appSettings = ConfigurationManager.AppSettings; string result = appSettings[key] ?? defaultValue;… Read More »

5 cent hint – Unix timestamp to c# datetime

If you need to covert Unix timestamp  to DateTime then here it is:   public DateTime TimestampToDatetime(long timeStamp) { var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); return epoch.AddSeconds(timeStamp); } var date = TimestampToDatetime(1490091991); Update: DateTime to Unix timestamp public static int DateToStamp(DateTime datetime) { var date = new DateTime(1970, 1, 1,… Read More »