Get the Parent of a GameObject in Unity C#

Get the Parent of a GameObject in Unity C#

GameObject theParent = childGameObjectName.transform.parent.gameObject;

Debug.Log(theParent.name);