System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(ex, true);
System.Diagnostics.StackFrame[] frames = st.GetFrames();
// Iterate over the frames extracting the information you need
foreach (System.Diagnostics.StackFrame frame in frames)
{
msg += string.Format("n Method Path : {0} n Method Name : {1}n Method Line : {2} n Mehtod StatIndex In Line : {3}", frame.GetFileName(), frame.GetMethod().Name, frame.GetFileLineNumber(), frame.GetFileColumnNumber()) + "n-----------------------------------n";
}
C# و SQL Server نکته های جالب و مهم در ...
ما را در سایت C# و SQL Server نکته های جالب و مهم در دنبال می کنید
برچسب : نویسنده : alinaiemabadio بازدید : 159 تاريخ : سه شنبه 29 آبان 1397 ساعت: 20:29