类型'< TypeName>没有名为'Name'的属性 [英] The type '<TypeName> has no property named 'Name'

查看:147
本文介绍了类型'< TypeName>没有名为'Name'的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在设计模式下打开我的控件时,我收到了这些错误。该控件是来自另一个自定义控件的子类,它定义了属性"Name"所在的属性。

When I attempt to open my control in design mode, I am receiving an error along these lines. The control is a child class from another custom control which defines the property on which the property 'Name' is located.

我不需要将基类属性设置为虚拟或任何操作我?

I don't need to make the base class property virtual or anything do I?

否则,控件都位于同一个程序集中,因此我不知道游戏中是否存在任何组合边界问题或类似的问题。

Otherwise, the controls are all located in the same assembly, so there are no assembly boundary issues in play or anything like that, that I am aware.

任何想法?

谢谢......

-Michael

推荐答案

Hi MWPowell,



基本上,错误意味着错误消息中指定的类型没有该名称的属性。但是,既然你说"来自另一个自定义控件的子类,它定义了属性'Name'所在的属性",很难想象根本原因
没有看到你的代码。请提供更多信息(使用其父控件的相关代码更好地控制子控件的代码)以帮助我们找到原因。


此致,
Hi MWPowell,

Basically, the error means The type specified in the error message has no property of that name. But since you say "child class from another custom control which defines the property on which the property 'Name' is located", It's hard to imagine the root cause without seeing your code. Please provide more information (the code for the child control better with its parent control's relative code) to help us find the cause.

Sincerely,


这篇关于类型'< TypeName>没有名为'Name'的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆