Environment.FailFast immediately terminates a process after writing a message to the Windows Application event log : Environment « Development « VB.Net
Environment.FailFast immediately terminates a process after writing a message to the Windows Application event log
Imports System
Class Sample
Public Shared Sub Main()
Dim causeOfFailure As String = "A castrophic failure has occured."
Try
Environment.FailFast(causeOfFailure)
Finally
Console.WriteLine("This finally block will not be executed.")
End Try
End Sub 'Main
End Class 'Sample