What is PreProcessor in .NET and type , where it use

Discussion in 'Computer Science and IT Students' started by Guest, Jan 8, 2007.

  1. Guest

    Guest Guest

    What is PreProcessor in .NET and type , where it use

    Answer
    The pre-processing directives provide the ability to conditionally skip sections of source files, to report error and warning conditions, and to delineate distinct regions of source code. The term "pre-processing directives" is used only for consistency with the C and C++ programming languages. In C#, there is no separate pre-processing step; pre-processing directives are processed as part of the lexical analysis phase.
    A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program that start with `#'. Whitespace is allowed before and after the `#'. The `#' is followed by an identifier that is the directive name. For example, `#define' is the directive
    Types are:
    #if, #else, #elif, #endif, #define, #undef, #warning, #error, #line, #region, #endregion

    They are used for:
    Conditional compilation
    Line control
    Error and Warning reporting

    For example u can refere the MS site ...
    http://msdn.microsoft.com/library/d...y/en-us/csspec/html/vclrfcsharpspec_2_5_4.asp

Share This Page