public string encode(string str)
{
string htext = "";
for (int i = 0; i < str.Length; i++)
{
htext = htext + (char)(str[i] + 10 - 1 * 2); }
return htext;
}
public string decode(string str)
{
string dtext = "";
for (int i = 0; i < str.Length; i++)
{
dtext = dtext + (char)(str[i] - 10 + 1 * 2); }
return dtext;
}
private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = encode(textBox1.Text);
}