Mono.CSharp LocalTemporary in C# (CSharp): 35 esempi trovati. Questi sono i migliori esempi reali in C# (CSharp) per Mono.CSharp.LocalTemporary, estratti da progetti open source. Li puoi valutare, per aiutarci a migliorare la qualità dei nostri esempi.
The LocalTemporary class is used to hold temporary values of a given type to "simulate" the expression semantics. The local variable is never captured. The local temporary is used to alter the normal flow of code generation basically it creates a local variable, and its emit instruction generates code to access this value, return its address or save its value. If `is_address' is true, then the value that we store is the address to the real value, and not the value itself. This is needed for a value type, because otherwise you just end up making a copy of the value on the stack and modifying it. You really need a pointer to the origional value so that you can modify it in that location. This Does not happen with a class because a class is a pointer -- so you always get the indirection.