Problem with adding encrypt code

Hi,

I need to add an encrypt code and just having problem doing it right. Can I someone help me

using System;

using System.Collections.Generic;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

bool quit = false;

while (!quit)

{

ShowMenu();

ConsoleKeyInfo key = Console.ReadKey();

switch (key.Key)

{

case ConsoleKey.E:

Console.ReadLine();

Console.Write("Enter a String to encrypt: ");

string plaintext = Console.ReadLine();

break;

case ConsoleKey.D:

Console.ReadLine();

Console.Write("Enter a String to decrypt: ");

string plaintext = Console.ReadLine();

break;

case ConsoleKey.Q:

quit = true;

break;

default:

Console.WriteLine("Unknown command");

break;

}

}

}

private static void ShowMenu()

{

Console.WriteLine("[ E ]ncrypt");

Console.WriteLine("[ D ]ecrypt");

Console.WriteLine("[ Q ]uit");

Console.WriteLine("Please enter command: ");

Console.WriteLine();

}

}

}



Answer this question

Problem with adding encrypt code