MSN remarks:
The Common Language Runtime Library does not add any semantics to this attribute. Provide itSource codeUse the debugger. For example, the Visual Studio 2005 debugger does not stop a method marked with this property, but does allow breakpoint setting in this method.
Detailed explanation:
When you are working on dubug, one annoying thing is that you have to enter someCodeMethod (or attribute. Suppose you have the following code:
Public StringWord
{
Get;
Set;
}
And you used this property when calling a method:
Dosomething (obj. Word );
When you debug this line of code, press F11 to enter the method. At this time, you will have to first enter the attribute, and then press F11 to enter the method.
If you want to remove the extra step, you can replace the above Code with the following style:
Code
Public StringWord
{
[System. Diagnostics. debuggerstepthrough]
Get{ReturnWord ;}
[System. Diagnostics. debuggerstepthrough]
Set{Word=Value ;}
}
In this way, when you debug to dosomething (obj. Word); this line of code, the debuggerstemthrough feature will tell the debugger to directly enter the method without entering the attribute content.