Microsoft.CSharp.RuntimeBinder.Semantics.MethodTypeInferrer.ExactArrayInference C# (CSharp) Метод

ExactArrayInference() приватный Метод

private ExactArrayInference ( CType pSource, CType pDest ) : bool
pSource CType
pDest CType
Результат bool
        private bool ExactArrayInference(CType pSource, CType pDest)
        {
            // SPEC:  Otherwise, if U is an array CType UE[...] and V is an array CType VE[...]
            // SPEC:   of the same rank then an exact inference from UE to VE is made.
            if (!pSource.IsArrayType() || !pDest.IsArrayType())
            {
                return false;
            }
            ArrayType pArraySource = pSource.AsArrayType();
            ArrayType pArrayDest = pDest.AsArrayType();
            if (pArraySource.rank != pArrayDest.rank)
            {
                return false;
            }
            ExactInference(pArraySource.GetElementType(), pArrayDest.GetElementType());
            return true;
        }