But by referencing
System.Diagnostics
You can place this tag above the event and it wont step into this event when the code is debugging.
[DebuggerHiddenAttribute]
As I will demonstrate below.
Code Snippet
- #region[Event] – Timer1Tick(xxx,xxx)
- ///<summary>
- /// When Timer1 ticks.
- ///</summary>
- ///<param name=”sender”>The sender.</param>
- ///<param name=”e”>The <see cref=”System.EventArgs”/> instance containing the event data.</param>
- [DebuggerHiddenAttribute]
- private void Timer1Tick(object sender,
- EventArgs e)
- {
- // get the current process
- long totalBytesOfMemoryUsed;
- using (Process currentProcess = Process.GetCurrentProcess())
- {
- totalBytesOfMemoryUsed = currentProcess.WorkingSet64;
- }
- toolStripStatusLabel1.Text = string.Format(“Current Memory Usage {0} MB”,
- ((totalBytesOfMemoryUsed / 1024) / 1024));
- }
- #endregion
I just wanted to post this, just in case it helps someone else one day!