Generally speaking, the using-declaration is safer to use because it shows exactly what names you are
making available. And if the name conflicts with a local name, the compiler lets you know. The using-directive
adds all names, even ones you might not need. If a local name conflicts, it overrides the namespace version,
and you won't be warned. Also, the open nature of namespaces means that the complete list of names in a namespace
might be spread over several locations, making it difficult to know exactly which names you are adding.
June 11th Thursday (六月 十一日 木曜日)
最新推荐文章于 2025-08-09 18:46:25 发布