Skip to content

Instantly share code, notes, and snippets.

@nakov
Created May 23, 2022 10:49
Show Gist options
  • Save nakov/f42e77b720794fc7bff23e94edfda5bf to your computer and use it in GitHub Desktop.
Save nakov/f42e77b720794fc7bff23e94edfda5bf to your computer and use it in GitHub Desktop.
Generate and Open HTML in C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
File.WriteAllText("weather.html", "<html><h1>Weather</h1></html>");
var p = new Process();
p.StartInfo = new ProcessStartInfo("weather.html")
{
UseShellExecute = true
};
p.Start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment