.net

WHY MONO IS NOT YET READY FOR MY BALLS

Submitted by reeses on Thu, 2005-12-01 14:55. | | | |
I've been working with lately, first with JScript .NET, and now with C#. I'm writing a simple, simple application that does some stuff, and can run either on the command line, or via some Windows scheduling mechanism. I.e., either as a service or using Windows Scheduler.

There's this great property called System.Environment.UserInteractive in .NET that tells you if the application was executed interactively. This is a great opportunity to decide where to dump the output of your application. If it's true, spew to System.Console. If it's false, write to a file or, in the case of Windows, to the beautiful, beautiful Event Log, available via System.Diagnostics.EventLog, even -- no work necessary!