Error 1 Inconsistent accessibility: return type is less accessible than method

前端 未结 4 1728
谎友^
谎友^ 2020-12-20 11:12

When I\'m building, VS show error. This is my code:

public Composite buildComposite(ComboBox subs, ComboBox bas)
{
    int count = 0;
    Composite a = new C         


        
4条回答
  •  被撕碎了的回忆
    2020-12-20 11:57

    Your custom type, Composite, is currently less accessible than your method buildComposite. For other classes to see this public method, they must also have public access to the Composite class/struct.

提交回复
热议问题