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 callingFormatterServices.GetUninitializeObject()
? - Is there an
Expressions
equivalent ofGetUninitializedObject
, or the only way to do this is usingExpression.Call
for it?
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