Data can be encrypted using Symmetric or Asymmetric Cryptography keys. Symmetric encryption involves the same key to encrypt as well as to decrypt the message. Both parties communicating the message has to know the key. Key distribution is a problem.
A quick code sample to convert object properties into name value string.
/// Converts to a string.
private string ConvertToString(object obj)
var propertyInfos = obj.GetType().GetProperties();
var sb = new StringBuilder();
foreach (var info in propertyInfos)
sb.Append(info.Name + ": ");
var pObj = info.GetValue(obj, null);
foreach (var o in (pObj as IEnumerable))
There are different ways to check if the internet connection is available. Below are few simple ways to do it. System.Net Namespace offers different classes to acheive that. WebRequest, WebResponse, HttpWebRequest and HttpWebResponse classes can be used to call a website
PROBLEM: Recently, I needed to create multiple instances of the window service for the same executable. Each instance need to perform different task depending upon the parameter being passed at the startup. Hence, the question is how do i pass the parameter