If B is a specific internal helper class that must not be used by other classes, then consider this approach:
- Add a new project to your solution: “Class Library” (or “Windows Forms Control Library” if A is a User Control).
- In your main project, add a project reference to new library.
- Define A and B inside the new library; remove A and B from your main project.
- Use the following definition of B: Public Class B
Public Property open As Boolean
Friend Property color As Color
End Class
You can also use Friend for the whole class B. Check the usage of access modifiers: https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/declared-elements/access-levels.