# Line this is a preprocessing command in C #.
Visual Studio 2008
- Visual Studio 2005
- Visual Studio 2012
# Line hidden command hides several consecutive lines from the debugger, so that when a developer passes the code one by one, all lines between the # line hidden and the next # line command (assuming it is not another # line hidden command) will be skipped.
# The line hidden command does not affect the file name or row number in the error report. That is, if an error occurs in the hidden block, the compiler reports the current file name and the wrong row number.
Example:
The following example shows how the debugger ignores hidden rows in the code.
When you set a breakpoint as shown in the example and press F11 to pass the code one by one, you will see that the debugger ignores hidden rows.
Note that the debugger ignores the breakpoint even if it is set on the hidden line.
Private void Header_Loaded (object sender, RoutedEventArgs e) {# line hidden GetTaskNum (UserId); StateCallback (); # line default}
For details, refer to: http://msdn.microsoft.com/zh-cn/library/34dk387t (v = vs.100). aspx