unity delete all children

C#
 foreach (Transform child in transform) {
     Destroy(child.gameObject);
 }
Source

Also in C#: