I created a new file (CustomMacroMethod.cs) within the App_Code folder and cut and paste the provided code. I noticed that a closing } character for the class was missing and after adding this in and refreshing the site (a recompile occurred) the macro worked as expected.
To test: add a static text web part to a page template, within the Text field, click the "edit in new window" button, start typing "{% CurrentUser.UserName.C" and "ConnectStrings" should show in the list of options. If its still not working, you could also try forcing a recompile of the site by making a small change to a source file within the App_Code folder and re-run the test.