I don't think that this might be the right conversion, but you can try it and let us know, as "HtmlUnit is a class library for Java that lets you programmatically play with web sites."
One think to remember that although the syntax between Java and C# looks the same, the way exceptions are declared is treated differently. In Java your class methods needs to identify the exceptions that it could possibly throw, where as this is not the case in C#, from there my feeble attempt to rewrite the piece of code.
Another thing I've picked up is the defining of methods within the object creation, but that might be part of the HtmlUnit framework.
webClient.setWebConnection(new HttpWebConnection(webClient) {
public WebResponse getResponse(WebRequestSettings settings) {
System.out.println(settings.getUrl());
return this.getResponse(settings);
}
});
If it is not working, it might just nudge you in the right direction.