本文介绍了您如何“替代"广告素材? C#中的内部类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在内部类内部的System.Web.Script.Services.ScriptHandlerFactory和其他.NET中自定义一些内容.不幸的是,这是一个内部类.尝试自定义此类中的方法时,我有什么选择?
There's something I want to customize in the System.Web.Script.Services.ScriptHandlerFactory and other .NET stuff inside an internal class. Unfortunately, it's an internal class. What options do I have when trying to customize a method in this class?
推荐答案
您可能会发现这篇最近的文章很有启发性.基本上,它说您不能覆盖任何标有internal
的内容,并且该来源具有权威性.您最希望得到的是扩展方法.
You might find this recent article enlightening. Basically, it says that you can't override anything marked internal
, and the source is about as authoritative as it gets. Best you can hope for is an extension method.
这篇关于您如何“替代"广告素材? C#中的内部类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!