---
title: "INodeIterator.Detach"
url: "https://reference.aspose.com/html/net/aspose.html.dom.traversal/inodeiterator/detach/"
product: "Aspose.HTML for .NET API Reference"
description: "INodeIterator Detach method. Detaches the NodeIterator from the set which it iterated over releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR"
---

## INodeIterator.Detach method

Detaches the NodeIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR.

```csharp
public void Detach()
```

### See Also

* interface [INodeIterator](../)
* namespace [Aspose.Html.Dom.Traversal](../../../aspose.html.dom.traversal/)
* assembly [Aspose.HTML](../../../)
