C# how to Instantiate Prefab with existing GameObject as Parent?

I’m trying to instantiate a new gameobject, and it needs to have an existing gameobject as parent. Is there an easy way to do this, i’m new to programming in general

GameObject newObject = Instantiate(prefab);
newObject.transform.parent=existingObject.transform;

Thats about as easy as it gets,.