mercredi 11 février 2015

Is there Expression trees equivalent of of FormatterServices.GetUninitializedObject()?

Normally I'd call Expression.New(type), but when a type doesn't have a parameterless constructor, that is not possible.



  • How does FormatterServices.GetUninitializedObject() work internally?

  • Is calling operator new() faster than calling FormatterServices.GetUninitializeObject()?

  • Is there an Expressions equivalent of GetUninitializedObject, or the only way to do this is using Expression.Call for it?






1 commentaire:

  1. Hi! I'm also on a quest to understand how FormatterServices.GetUninitializedObject() works internally. Seems like a piece of magic :) Did you by any chance find more information on this?

    RépondreSupprimer