I know this is an old topic but in case anyone wants to try the code, there is a mis-type in one line. string s2 = tx.Text; should be string s2 = ty.Text;
s2 = tx.Text;
string s2 = ty.Text;