using OpenQA.Selenium.Chrome; class Program { static void Main() { ChromeDriver driver = new ChromeDriver(); // Do some steps using ChromeDriver driver.Dispose(); } }
using OpenQA.Selenium.Chrome; class Program { static void Main() { using(var driver = new ChromeDriver()) { // Do some steps using ChromeDriver } } }This example uses the `using` statement to create a `ChromeDriver` instance and perform some steps using the driver instance. Once the `using` statement is done, the `Dispose()` method of the `ChromeDriver` instance is automatically called, releasing any resources held by the driver instance. Package library: `Selenium.WebDriver.ChromeDriver` is a package library providing C# bindings for the Chromium-based Microsoft Edge web driver that is based on the Chromium project.