Environment.HasShutdownStarted
using System; class MainClass { public static void Main() { Console.WriteLine("Shutting down? : " + Environment.HasShutdownStarted); } }