/// <summary> /// Emits code that loads address of this storage place. /// </summary> /// <param name="il">The <see cref="ILEmitter"/> to emit the code to.</param> public void EmitLoadAddress(ILEmitter il) { switch (holder) { case PlaceHolder.Local: il.Ldloca(index); break; case PlaceHolder.Argument: il.Ldarga(index); break; case PlaceHolder.None: throw new InvalidOperationException(); } }