Updated to reflect new sample and blog spawned from a StackExchange answer!

http://salesforce.stackexchange.com/questions/18843/using-meta-data-api-in-apex/18857#18857