c# - Creating Object Instances Faster Than Reflection in Windows CE -


so after looking @ article describing how create object instances faster reflection got excited since in code have quite bit of reflection. unfortunately dynamicmethod , ilgenerator not supported in windows ce. edit: activator supported in windows ce

i wondering if knew of way create object instances faster reflection in ce. if not, maybe explain why windows ce not support feature , if there work arounds feature in ce. if had code own dynamicmethod , ilgenerator classes might worth :)

first, activator supported. take @ the docs here.

that said, it's not fastest thing on planet, if intend create more 1 instance of given type. did in opennetcf.ioc framework after lots of testing of different way build object cache constructorinfo on per-type basis (specifically in objectfactory class) , used object creation. yes, you've got use reflection ci first time, subsequent calls fast since you've got delegate.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -