I can do
using MyType = System.Collections.Generic.List<SomeClass.AClass>;
Now i only need MyType to be used within SomeClass. So i dont really need SomeClass to be public. However i can only do this outside of my namespace.
So how do i work this in such a way i can use MyType without making SomeClass and SomeClass.AClass public?
I don’t see what this could gain you apart from saving keystrokes. If you want to do this to keep the option of easily replacing the
Listwith another type of collection, then you can change the static types of the variable holding the collection to an appropriate interface.That said, if you must go this way for some reason, there is always this option:
You can do this inside
SomeClass.