using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rs.MotionPlat.Commom { public static class SourceHelper { public static int GetLineNum() { System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(1, true); return st.GetFrame(0).GetFileLineNumber(); } public static string GetCurSourceFileName() { System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(1, true); return st.GetFrame(0).GetFileName(); } } }