In .NET, you have NGEN (your own generator), which allows you to compile IL code into machine code that is suitable for the particular machine on which your application is running. (You cannot use this tool to compile your IL code for machine code for all computers, this tool depends on the processor, OS and ...]. Thanks to this tool, the performance of your application will be too much increased.
The [TargetedPatchingOptOut] attribute, which is used in the WPF (.NET) version code, is intended for the NGEN tool, and this attribute should be used on top of the constructor here, so the interface is not suitable here.
In Silverlight, you donโt have NGEN, you donโt have an attribute named [TargetedPatchingOptOut]
Good luck.
source share