Whats wrong with these pre-processor directive in C#
#define OUTPUT_DIRECTORY \"E:\\asdf\\sdfg\\jhkl\\\"
I also tried giving:
You define a symbol. You can't assign a value to it.
Symbols are not variables. See more on MSDN.
The usage could be:
#ifdef OUTPUT_DIRECTORY
someVariable = "E:\\asdf\\sdfg\\jhkl\\"
#endif
You cannot give that symbol (OUTPUT_DIRECTORY) a value, the symbol can only be "defined" or "undefined" so you can use it in a #if OUTPUT_DIRECTORY
... #endif
.
See http://msdn.microsoft.com/en-us/library/yt3yck0x(VS.71).aspx
In addition to Oded and Hans' answers, I'd recommend simply making it a constant rather than trying to use the pre-processor. If it's used by multiple classes, define it in a common class.