The answer you link to states that removing unused using
directives doesn't affect compilation output.
The using directives list the namespaces the compiler is allowed to implicitly reference in the generated code. Without the directive, you must fully qualify all names, so:
using System.Diagnostics;
...
var x = new Process();
instead of
var x = new System.Diagnostics.Process();
So it is a true directive in the sense that it changes how the compiler interprets your code.
A Preprocessor Directive is applied to change the source code before it is compiled. Preprocessor Directives in C# are very limited. Unlike in C / C++ -- where you can entirely re-write the source code before it is compiled -- in C# you can turn blocks of code on and off, and change a few compiler flags. As far as I'm aware, they aren't applied in a separate stage as in C / C++.
And for completeness, the using
statement is syntactic sugar, turning
using (var x = new IDisposable()) {}
(where var x =
is optional)
into
var x = new IDisposable();
try{ ... }
finally { x.Dispose(); }