I can't comment as to why this code generation strategy is used, but you shouldn't have to worry about performance. Short methods such as those getters and setters will generally be inlined by the runtime's JIT compiler, so there's no penalty for not using fields directly (the generated machine code should be identical).

By on 3/22/2010 8:23 AM ()

There will probably be a performance penalty if the type of the field is a large struct type. There are also other situations where the .NET JITs don't inline small methods perfectly.

By on 3/24/2010 6:33 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper