Encryption / Decryption in C#

Introduction: As as web Developer some times you need encryption and Decryption in c#. for this purpose a quick code snap is given below. Solution: C# Encryption Function: public static string Encrypt( string textToEncrypt, int key) { StringBuilder inSb = new StringBuilder (textToEncrypt); StringBuilder outSb = new StringBuilder (textToEncrypt.Length); char c; for ( int i = 0; i < textToEncrypt.Length; i++) { c = inSb[i]; if (c <= 32) { ...