troubleshooting Question

Classes and Namespace

Avatar of cdemott33
cdemott33Flag for United States of America asked on
.NET ProgrammingVisual Basic ClassicASP.NET
5 Comments1 Solution295 ViewsLast Modified:
Newbie question.  When you create a Class in Visual Studio I right-click the 'AppCode' folder, select 'Class' and name the class "Customers".  It throw the Customers.vb file in my 'AppCode' folder.  Great.

Here's my question?  When you create a Class file, such as "Customer.vb" does the NameSpace have to MATCH or can it be name differently?

I've been doing some research on naming convensions and what I've found online says that your namespace should be something like this:

CompanyName.Customers.DataLayer

If that's the case, should my Class file be renamed from "Customers.vb" to "CompanyName.Customers.DataLayer.vb"

Hope this makes sense.  I just confused on the correct way to do it and if they need to match.  Please help!
ASKER CERTIFIED SOLUTION
jmwheeler

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros