parent object rotate with child camera

I have my main camera as a child of a child object,

parent -> child -> camera

What I want to happen is for the Y rotation of the parent object to match the camera in a smooth animation.

How would I accomplish this in C Sharp?

If you want Rotations look at Transform in the scripting documentation. It has functions like Lerp, Rotate and such. Just get timings down and how far you want them to move and this should get you started for what you want.