Display Exception Stack Trace
Imports System Public Class MainClass Shared Sub Main(ByVal args As String()) Dim stack_trace As New System.Diagnostics.StackTrace(True) For i As Integer = 0 To stack_trace.FrameCount - 1 With stack_trace.GetFrame(i) Console.WriteLine("Method: " & .GetMethod().ToString & _ ", File: '" & _ .GetFileName() & _ "', Line: " & .GetFileLineNumber() ) End With Next i End Sub End Class
1. | Inner Exception Demo |