Using Statements vs Namespace path? C#

There is zero performance difference because the compiler ALWAYS puts in the full name – using is only a hint for the compiler, the runtime doesn’t know or support that.

However, once you memorize where the objects come from you will look at this as silly and verbose. There is just so much noise and people just know that Path is from System.IO, Console is in System and StringBuilder is in System.Text.

One downside of your approach: Without using, no extension methods outside of the current namespace. Have fun writing System.Linq.Enumerable.Where(inputSequence,...) instead of just inputSequence.Where(...) 🙂

Leave a Comment