#line lets you modify the compiler’s line number and (optionally) the file name output for errors and warnings.
#line number "file_name"
where:
#line might be used by an automated, intermediate step in the build process. For example, if the intermediate step removed lines from the original source code file, but if you still wanted the compiler to generate output based on the original line numbering in the file, you could remove lines and then simulate the original line numbering with #line.
A source code file can have any number of #line directives.
using System; public class MyClass { public static void Main() { #line 100 "abc.sc" // change file name in the compiler output intt i; // error will be reported on line 101 } }