System.Diagnostics.SymbolStore.SymScope.GetLocals C# (CSharp) Method

GetLocals() public method

public GetLocals ( ) : ISymbolVariable[]
return ISymbolVariable[]
        public ISymbolVariable[] GetLocals() 
        {
            COMException Exception;
            int hr;
            uint i;
            int cLocals;
            IntPtr[] LocalPointers;
            SymVariable[] Locals;
            hr = SymScope_GetLocals(m_Scope, 0, out cLocals, null);
            if (hr < 0)
            {
                Exception = new COMException("Call to GetLocals failed.", hr);
                throw Exception;
            }
            LocalPointers = new IntPtr[cLocals];
            Locals = new SymVariable[cLocals];
            hr = SymScope_GetLocals(m_Scope, cLocals, out cLocals, LocalPointers);
            if (hr < 0)
            {
                Exception = new COMException("Call to GetLocals failed.", hr);
                throw Exception;
            }
            for (i = 0; i < cLocals; i++)
            {
                Locals[i] = new SymVariable(LocalPointers[i]);
            }
            return Locals;
        }