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?