[英]How do I turn off the warning “use the new keyword if hiding was intended”?
Ref: "Use the new keyword if hiding was intended" warning 参考: “如果打算隐藏则使用new关键字”警告
This time, the warning needs to go away without editing file to add the new keyword. 这次,警告需要消失而无需编辑文件来添加新关键字。
Why? 为什么? Generated derived class.
生成派生类。
只需在要禁用警告的文件顶部添加#pragma warning disable 108
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.