I just did this, this past weekend, wow what a pain in the *** it turned out to be for me. I recently picked up this car and the shift points felt grannyish, so I decided to reset it. I disconnected the terminal, closed the trunk, come back down to open it and connect it. No go, the key does not turn, and not cause its a different lock or anything like that, probably just cause its almost never really used. So I graphite it up, use special de-icer stuff, no go. I called Benz Roadside, the guy came within the hour, couldnt do much, but before he left, he figured out how to jump the car from the front, under the hood. Something the book, and other techs told me couldnt be done. Anyway, that was a great end to the saga, but then like you said, I needed the radio code, and my car didnt even come with the card, last owner mustve lost it. So I called the roadside number, told them what happened, they asked me for the last 8 #'s of the VIN and told me my code right away.
Not sure if there's an easier way to do it. Seemed very worth it, for me.
NOTE- First test your key, make sure you can physically open the trunk using the actual metal key. If not, obviously do not slam the trunk.