Did you call RefreshSchema after you were done?
Generally, I don't recommend using code to extend the schema (alway use LDIF files for repeatability and transparency since admins will usually want to know what you are doing), but you can do this in code if you really need to.