I have a project with a namespace and class defined like
namespace My.Company.Project.Models{ class Item {...}}
and then in another project I try to use this class:
using My.Company.Project;...var obj = new Models.Item
but the compiler says that the "Using directive is unnecessary" and I get an error
CS0246 - The type or namespace name 'Models' could not be found (are you missing a using directive or an assembly reference?)
If my usage instead is
using My.Company;...var obj = new Project.Models.Item
it works fine. Why can I use My.Company
but not My.Company.Project
in my using statement and how can I qualify this so that I don't need such verbose namespace naming of classes?