Your Composite
class is not public
. You can't return a non-public type from a public method.
If you don't specify an accessibility for a non-nested class then internal
is used by default. Add public
to your Composite
class definition:
public class Composite
{
...
Alternatively, if buildComposite
doesn't need to be public
(meaning it's only used internally by the form), then you could make the method private
or internal
as well:
private Composite buildComposite(ComboBox subs, ComboBox bas)
{
....
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…