using directives placement (file Vs. namespace scope)

This is just a reminder…

Once I read that there was a difference between these that affected when referenced assemblies (via using directives) would be loaded depending on where the using directives where put (file or namespace scope), this was allegedly adjudicated to some sort of lazy loading at CLR level. This apparently came from a MS blog post from the StyleCop (not FxCop) team which apparently has been deleted. Link is/was link (just for reference).

This post caused different reactions, here are some posts about it (which include experiments):
Hanselman’s reaction
Ian G’s reaction


tl;dr;
Placement only affects compiler’s order for types querying, and not actual assembly loading at run-time; the latest would only be affected by inlining.

Advertisements