Maybe not the best, but this is how I would do it:
Set up a Dictionary<string,string> for all of your words. The key is "double", the value is "hello" etc.
parse the value of the textbox in it's entirety each time like so:
Dictionary<string,string> cypher = new Dictionary<string,string>
{
{"double","hello"},
};
string Decode(string code){
return code
.split(' ')
.Select(c=>
cypher.ContainsKey(c)
?cypher[c]
:c);
}
No idea why you want this. There are much better cyphers out there that use full words and even sentences. Granted they are more complex to write codes for, though
Hope that helps ^_^
Andy