JavaScript EditorDhtml editor     Free javascript download 

Main Page

The following code example demonstrates how to determine whether the application or the .NET Framework is currently terminating. This is useful for accessing static elements in the .NET Framework because, during shutdown, these constructs are finalized by the system and cannot be reliably used. By checking the HasShutdownStarted property first, you can avoid potential failures by not accessing these elements.


В CopyCode imageCopy Code
// check_shutdown.cpp
// compile with: /clr
using namespace System;
int main() 
   if (Environment::HasShutdownStarted)
      Console::WriteLine("Shutting down.");
      Console::WriteLine("Not shutting down.");
   return 0;

See Also

JavaScript EditorDhtml editor     Free javascript download