小编use*_*838的帖子

错误1可访问性不一致:返回类型比方法更难访问

当我建立时,VS显示错误.这是我的代码:

public Composite buildComposite(ComboBox subs, ComboBox bas)
{
    int count = 0;
    Composite a = new Composite();
    if (subs.SelectedItem != null)
    {
        foreach (Substance d in listSubstance)
        {
            if (String.Compare(d.notation, subs.Text) == 0)
            {
                count++;
                a.subs = new Substance(d);
                break;
            }
        }
    }
    if (bas.SelectedItem != null)
    {
        foreach (Base g in listBase)
        {
            if (String.Compare(g.notation, bas.Text) == 0)
            {
                count++;
                a.bas = new Base(g);
                break;
            }
        }
    }
    if (count > 0)
    {
        a.equilibrium();
        a.settypesubs(arrayDefinition);
        return a;
    }
    else …
Run Code Online (Sandbox Code Playgroud)

c# access-modifiers winforms

12
推荐指数
2
解决办法
4万
查看次数

标签 统计

access-modifiers ×1

c# ×1

winforms ×1