Well, to fix the problems "in executing" you have to use the debugger, run your code step by step and see what and where goes wrong.

Besides, better approach would be passing your MyString...