The .NET Framework is a tree with so many branches that sometimes you
loose time on thinking how to implement a certaint thing and, after
that, you discover that "someone" has embedded the functionality you want into
the Framework itself.
Tomorrow I was thinking on how to check (on a Windows Form application) if
the OS was booted correctly or not and I've discovered the System.Windows.Forms.SystemInformation.BootMode
property. The task is so simple now:
1 Select Case System.Windows.Forms.SystemInformation.BootMode
2 Case BootMode.FailSafe
3 'Safe Mode
4 Case BootMode.FailSafeWithNetwork
5 'Safe Mode with Networking support
6 Case BootMode.Normal
7 'Normal Mode
8 End Select
The little properties helps you to save your time...