Mono.CSharp.EmitContext.DeclareLocal C# (CSharp) Method

DeclareLocal() public method

public DeclareLocal ( System.TypeSpec type, bool pinned ) : LocalBuilder
type System.TypeSpec
pinned bool
return System.Reflection.Emit.LocalBuilder
		public LocalBuilder DeclareLocal (TypeSpec type, bool pinned)
		{
			if (IsAnonymousStoreyMutateRequired)
				type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type);

			return ig.DeclareLocal (type.GetMetaInfo (), pinned);
		}

Usage Example

Example #1
0
		public void ResolveVariable (EmitContext ec)
		{
			if (HoistedVariant != null)
				return;

			if (builder == null) {
				builder = ec.DeclareLocal (VariableType, Pinned);
			}
		}
All Usage Examples Of Mono.CSharp.EmitContext::DeclareLocal