Difference between Namespaces and Packages.
Is there any difference between namespaces and packages or it's just two similar terms used at different platforms?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jan 9, 2014, 3:26 PM
1. You can restrict the access of classes (or class members) to classes within the same package.
2. When importing a package, you can import a single class rather than all classes in the package.
You can't do either of these things with namespaces in C++ or C# though C# does have a 'namespace alias' feature which allows you to import a single class from a namespace as long as you give it an alias. For example:
using VBI = Microsoft.VisualBasic.Interaction;
VB.NET supports #2 but not #1.