I had a similar problem with my jeep. i would start it and it would go up to high revs and wouldn't come down at all sometimes.
I had to have something called the idle speed sensor or something like that replaced. or The Idle Control valve not sure what it was,but since i had that part replaced the car never did it again.
If you can start your car when its in gear, then most likely the the Neutral Safety switch has a problem.
Some cars may not have this feature, but i would assume most cars do.
P.S. i'm not a tech, but just thought this would assist because of the similarity of the problem even though in my case it applied to a jeep and not a benz.
'92 300CE - Sold
2004 C240 - C7 Wheels
2015 ML350 - P1, Pano, Ash poplar wood, Sport Dinamica interior, Running Boards Keyless go.