4

Lets take following example:

public static class Extensions
{
    public static string MakeString(this object obj)
    {
        if (obj == null) return string.Empty;

        return obj.ToString();
    }
}

public class ABC
{
    public void Method()
    {
        object obj = default(object);

        //Implemention goes here..

        // Here every time in step into navigate to MakeString() Method.
        if(IsValid(obj.MakeString()))             
        {
            //Operations..
        }
    }

    private bool IsValid(string str)
    {
        //Check if string is valid or not..
        return true;
    }
}

In this example Extentions class having extention method and am using it in class ABC and when step-into in condition with this extention and other method call then every time I step-into in MakeString() method, can we skip it? By using method attribute? or by other way?

Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
Ankush Madankar
  • 3,689
  • 4
  • 40
  • 74
  • possible duplicate of [Can I mark a class as not my code so the debugger steps over it?](http://stackoverflow.com/questions/4951159/can-i-mark-a-class-as-not-my-code-so-the-debugger-steps-over-it) – Alberto May 06 '14 at 11:12

1 Answers1

6

You can use the DebuggerStepThrough Attribute for this.

nvoigt
  • 75,013
  • 26
  • 93
  • 142