Error CS1585: Member modifier 'public' must precede the member type and name

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

Whatever you did above is NOT code tags because there are no line numbers so nobody here can tell you “LOOK ON LINE XXX”

Go to the line where the error is reported and look up and down a few lines and verify you have 100% of everything typed properly.