Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 A 类继承了B 类,该 B类继承了AxHost。
我的属性显示为只读,没有设置强制执行此行为的属性。
public int MyProperty { get; set; }
我的财产缺少 DispId 属性。
[System.Runtime.InteropServices.DispId(96859268)] public int MyProperty { get; set; }
DispID 必须跨接口唯一?
进一步的问题: 在我的示例中,B 类确实有一些带有 DispId 标记的属性和一些没有标记的属性,而那些没有标记的属性不受只读的影响。如果有人对此有解释,请分享。