public PixEvent(string eventName = "...") { StackTrace st = new StackTrace(); StackFrame sf = st.GetFrame(1); string clsName = new string( sf.GetMethod().DeclaringType.Name.Where(ch => char.IsUpper(ch)).ToArray()); SafeNativeMethods._BeginEvent(0, clsName + "." + sf.GetMethod().Name + " - " + eventName); }