C# Simple Recursive
```csharp
public class Solution
{
    public IList<TreeNode> DelNodes(TreeNode root, int[] to_delete)
    {
        var result = new List<TreeNode>();
        var toDelete = to_delete.ToHashSet();
        DelNodesDfs(ref root, isRoot: true);
        return result;

        void DelNodesDfs(ref TreeNode node, bool isRoot)
        {
            if (node != null)
            {
                var deleted = toDelete.Contains(node.val);
                DelNodesDfs(ref node.left, deleted);
                DelNodesDfs(ref node.right, deleted);

                if (deleted)
                {
                    node = null;
                }
                else if (isRoot)
                {
                    result.Add(node);
                }
            }
        }
    }
}
```
['Depth-First Search', 'C#']