Here Mudassar Ahmed Khan has explained with an example, how to create HTML File in Console (Command) Application using C# and VB.Net.
First, an HTML Table will be generated in the form of an HTML string and then the HTML string will be written to an HTML File and saved in Folder (Directory) using C# and VB.Net.