C#: Inconsistent accessibility: property type

前端 未结 4 1715
南笙
南笙 2020-12-06 04:00

What\'s wrong with

public partial class MainWindow : Window
{
    public ObservableCollection Tabs { get; set; }
    public ICollectionV         


        
4条回答
  •  情深已故
    2020-12-06 04:50

    The message is very straight-forward. It is contradicting to what you want to do. It says you have something declared as public (Tabs, in this case) but the guy who would be using it also need to know about TabViewModel which is not public. Either make both public or some consistent access specifier.

提交回复
热议问题