When you reference certain methods, you can either use using or explicitly type in the entire namespace. Are there any speed advantages of using one method over the other, or is it simply there to make typing out the entire namespace easier? thanks
There is no difference at runtime.
In the .NET meta-data, a type is always represented using a full name that includes the namespace, so the using directive known from C# will disappear when a program is compiled.
There are some subtle aspects (at compile time) when it comes to writing the using inside or outside of a namespace (see for example this question), but that's also only a compile-time issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With