Microsoft.CSharp.RuntimeBinder.Semantics.ExprFactory.CreateArrayIndex C# (CSharp) Method

CreateArrayIndex() public method

public CreateArrayIndex ( EXPR pArray, EXPR pIndex ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYINDEX
pArray EXPR
pIndex EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRARRAYINDEX
        public EXPRARRAYINDEX CreateArrayIndex(EXPR pArray, EXPR pIndex)
        {
            CType pType = pArray.type;

            if (pType != null && pType.IsArrayType())
            {
                pType = pType.AsArrayType().GetElementType();
            }
            else if (pType == null)
            {
                pType = GetTypes().GetReqPredefAgg(PredefinedType.PT_INT).getThisType();
            }
            EXPRARRAYINDEX pResult = new EXPRARRAYINDEX();
            pResult.kind = ExpressionKind.EK_ARRAYINDEX;
            pResult.type = pType;
            pResult.flags = 0;
            pResult.SetArray(pArray);
            pResult.SetIndex(pIndex);
            return pResult;
        }