I came across the same problem too, and as a programmer I find the # key is kind of important, so the only way to get it was re-map a key that you won't use. In my case it's the top left S with a circle in the middle - 'Section' symbol I think.
I did this by:
1) Download the Microsoft Keyboard Layout Creator from
here--
http://www.microsoft.com/downloads/details.aspx?FamilyID=8be579aa-780d-4253-9e0a -e17e51db2223&DisplayLang=en
or here--
http://files.filefront.com/MSKLCexe/;8387676;/fileinfo.html
2) After it's installed, run it from the Start Menu
3) Click "File" > "Load Existing Keyboard...". Then choose United Kingdom (Apple) from the list and click OK
4) Now on the graphical/virtual keyboard double click the key you want to re-map
5) A little box should appear with the symbol and three buttons, click the "All..." button
6) Now in the first input box, type in "U+0023" (without the quotes!). If you click into the second field you will see that the first "Actual Char(s)" box will change to the hash symbol. Click OK to that window.
7) Click "File" > "Save Source File As...", choose the directory to save to and type a name to save the KLC file.
8) Click "Project" > "Build DLL and Setup package" - It will ask you to review the properties, click Yes and check the layout is named so you can recognise it, then click OK. This will build a folder with a few files in the designated "Current working directory" (default is My Documents > 'your layout name, probably Layout01')
9) Go to the directory it put the files in, and run Setup.exe, that installs the updated keyboard layout.
10) Now go to Control Panel > Regional and Language Options. Click the Languages tab and then click the Details button. From the first dropdown menu choose the updated keyboard layout name (in my case it was called "English (United Kingdom) - United Kingdom (Apple) - Custom". Then click OK, and OK again.
Now if you run Notepad or something, when you press the key you re-assigned it should type the # key instead.
Another good thing is that the layout creator doesn't have to be open all the time for the key to work, unlike some other remapping programs.