C# #line directive
In this chapter you will learn:
#line directive
The #line
directive sets the line number and filename.
#line
is primarily used for debugging and special applications.
The number and the name are used when outputing errors or warnings.
Syntax
The general form for #line
is
#line number "filename"
number
is any positive integer- The optional "
filename
" is any valid file identifier
Example
Example for #line
directive
using System;/*from ww w . jav a 2 s . co m*/
class MainClass
{
[STAThread]
static void Main(string[] args)
{
#line default
#line 3000
}
}
The code above generates the following result.
Next chapter...
What you will learn in the next chapter: