Dev2.Data.Decision.Dev2DataListDecisionHandler.FetchStackValue C# (CSharp) Method

FetchStackValue() private method

Fetches the stack value.
private FetchStackValue ( Dev2DecisionStack stack, int stackIndex, int columnIndex ) : string
stack Dev2.Data.SystemTemplates.Models.Dev2DecisionStack The stack.
stackIndex int Index of the stack.
columnIndex int Index of the column.
return string
        private string FetchStackValue(Dev2DecisionStack stack, int stackIndex, int columnIndex)
        {
            // if out of bounds return an empty string ;)
            if(stackIndex >= stack.TheStack.Count)
            {
                return string.Empty;
            }

            if(columnIndex == 1)
            {
                return stack.TheStack[stackIndex].Col1;
            }
            if(columnIndex == 2)
            {
                return stack.TheStack[stackIndex].Col2;
            }

            return string.Empty;
        }