static public string Encrypt(string a)
{ char[] temp = a.ToCharArray();
for (int i = 0; i < a.Length; i++)
string b = new string(temp);
static public string Decrypt(string a)
{ char[] temp = a.ToCharArray();
for (int i = 0; i < a.Length; i++)
string b = new string(temp);
public static void Main()
while (ans != "Q" && ans != "q")
Console.WriteLine("Would you like to encrypt or decrypt the message?");
Console.WriteLine("Enter E for encrypting or D for decrypting");
string choice = Console.ReadLine();
if (choice == "E" || choice == "e")
Console.WriteLine("What would you like to encrypt? (Write in capital letters)");
string encryption = Console.ReadLine();
Console.WriteLine(Encrypt(encryption));
else if (choice == "D" || choice == "d")
Console.WriteLine("What would you like to decrypt? (Write in Capital letters)");
string decryption = Console.ReadLine();
Console.WriteLine(Decrypt(decryption));
{Console.WriteLine("You have an error.");
Console.WriteLine("Would you like to run the program again? press q to quit or enter to continue.");
ans = Console.ReadLine();