and, according to that document, "If any of the method's formal
arguments are structs, the method will not be inlined."


<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/highperfmanagedapps.asp>
>
Uhm, now thinking of it, if a method/property is inlined, what happens
when the API changes? So when you use Rectangle, and the setter of
Width is changed, won't your program still used the obsolete version
of Rectangle.set_With? Or am I thinking totally wrong?

The inlining is runtime feature. Every time You restart Your application, the progarms are recompiled from the CIL (and any optimizations/inlining is performed) And You are propably not able to replace assembly during one program execution :)

What You have to remember is rthat the compilation is performed twice: once when compiling from high-level language (C#, for example) to CIL, second time when the program executes and the CIL is compiled to native code. Inlining is perfomed during second compilation.

--
Gert

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to