Is it possible to get IntrospectionExtensions for .NET 4.0. It is available by default in .NET 4.5, but for various reasons, I would like to use it in .NET 4.0.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Simply add the Mono source code to your project and compile it, https://github.com/mono/mono/blob/mono-4.0.2.4/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs#L40
Make sure you remove it once migrating to .NET 4.5 and above.