System.Reflection.Emit.ILGenerator.DeclareLocal C# (CSharp) Method

DeclareLocal() public method

public DeclareLocal ( System localType ) : System.Reflection.Emit.LocalBuilder
localType System
return System.Reflection.Emit.LocalBuilder
        public virtual System.Reflection.Emit.LocalBuilder DeclareLocal(System.Type localType) { throw null; }
        public virtual System.Reflection.Emit.LocalBuilder DeclareLocal(System.Type localType, bool pinned) { throw null; }

Same methods

ILGenerator::DeclareLocal ( System localType, bool pinned ) : System.Reflection.Emit.LocalBuilder

Usage Example

 public LocalVariableCollection(ILGenerator il, bool decode)
 {
     this.il = il;
     variables = new Dictionary<string, LocalBuilder>();
     dataPointer = il.DeclareLocal(typeof(byte*));
     remainingBytes = decode ? il.DeclareLocal(typeof(int)) : null;
 }
All Usage Examples Of System.Reflection.Emit.ILGenerator::DeclareLocal