Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


ienumerator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ienumerator [2021/03/18 15:09]
73.95.178.156
ienumerator [2021/04/29 19:10] (current)
uninomiconadmin
Line 13: Line 13:
   * -1: The generator has finished, the generator exited early, or the generator threw an exception.   * -1: The generator has finished, the generator exited early, or the generator threw an exception.
  
-The state value is set in a field ''private int <>1__state'' on the generated IEnumerator class:+The state value is set in a field ''%%private int <>1__state%%'' on the generated IEnumerator class: 
 <code c#> <code c#>
     [CompilerGenerated]     [CompilerGenerated]
Line 85: Line 86:
 The lambda function is stored as a local variable ''<>8__1'' in the generated IEnumerator class. However, the instance is created at the start of the function, not just before usage, as one might expect.  The lambda function is stored as a local variable ''<>8__1'' in the generated IEnumerator class. However, the instance is created at the start of the function, not just before usage, as one might expect. 
  
-===== All lambdas are piled into a single DisplayClass anonymous type, and share the same instance. =====+**All lambdas are piled into a single DisplayClass anonymous type, and share the same instance.**
  
  
ienumerator.1616080179.txt.gz · Last modified: 2021/03/18 15:09 by 73.95.178.156