[Mono-list] Nothing happens with mono-service and EventLog.WriteEntry

Will Murnane will.murnane at gmail.com
Thu Feb 15 12:29:06 EST 2007

On 2/15/07, Robert Jordan <robertj at gmx.net> wrote:
> This test is not valid because future OS platforms (say
> Win64<InsertCoolNameHere>) would be mapped to Unix.
Sure, but neither is the other test future-compatible.  Suppose you're
on a platform that isn't 4 or 128 but isn't MS Windows?  It's safer to
only do Windows things only when you're sure you're on Windows.  If
new platforms are added, you need to handle them, whether you do
something special in their case or not.  I'd tend to write a
switch/case statement, handle all cases, and have the default throw an
exception.  That way when new platforms come out you remember to
update the case statement.  After all, who knows if the existing code
will suffice for the new platform!


More information about the Mono-list mailing list