1
((food)this.ParentForm).getlistoffood();
它从food.cs文件调用方法getlistoffood
。但它this.ParentForm
为空。以下函数为null this.ParentForm,有什么建议吗?
((food)this.ParentForm).getlistoffood();
它从food.cs文件调用方法getlistoffood
。但它this.ParentForm
为空。以下函数为null this.ParentForm,有什么建议吗?
ParentForm
只适用于您以前设置。你有吗?
为什么要将partent形式转换为食物? – Alex