class - C# Inconsistent Accessibility (Multiple Classes) -
i getting inconsistent accessibility problem have 1 class contains list of class
namespace ns { public class foo { public foo() { this.bar = new list<bar>(); } private list<bar> bar; } public class bar { public bar() { } } }
the error property type ns.bar less accessible property ns.foo.bar
the structure application each foo consists of dynamic array (list) of bar. it's not ecommerce best example ecommerce store->categories->products in terms of how data accessed.
i don't compile errors , shouldn't either, have tried cleaning or rebuilding project before trying again? since bar public should have no problem using in other class.
Comments
Post a Comment