Property cannot be declared public because its type uses an internal type

前端 未结 3 1650
北恋
北恋 2021-02-03 16:30

I created two classes Content and Bucket. Bucket contains an array of Content objects and exposes that via a public property

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-03 17:18

    Content must be declared as public too:

    public class Content {
      …
    }
    

    Depending on your use-case you might declare Bucket as internal, too. Just omit the public keyword in this case.

提交回复
热议问题