The exam and the play

You had the right idea, but this isn't valid C#.