## DOMTokenList.Replace method

Replaces an existing token with a new token. Does nothing if the first token doesn't exist.

```csharp
public bool Replace(string token, string newToken)
```

| Parameter | Type | Description |
| --- | --- | --- |
| token | String | The token you want to replace. |
| newToken | String | The token you want to replace the old token with. |

### Return Value

Boolean `true` if the token was found and replaced, `false` otherwise.

### See Also

* class [DOMTokenList](../)
* namespace [Aspose.Html.Collections](../../../aspose.html.collections/)
* assembly [Aspose.HTML](../../../)
