Compare 2 dynamic jagged arrays of doubles and arrays of doubles
Nice question, and I am inspired to answer it, even though I don't use C#. I know enough about the algorithmic side to see a better way.

First though, the multitude of 1-liner if-conditions are bad practice. You should consider using braces even for these values.

The second thing, is the bitwise-XOR ^ operator you are doing in two places... this is conceptually broken, and unnecessary. A simple logical OR || comparison will be fine, since the previous check would return true if both values were null.

if (a == null || b == null)
{
     return false;
}


Now, about your algorithm.

The recursive system you have is a good option, but, if you change the 'recurse' point of the recursion, you will be able to do things in a more concise way. At the moment you are doing a number of the tests twice.

Have a look at the following:

public static bool ArraysEqual(dynamic a, dynamic b)
{
    // Same objects or both null
    if (ReferenceEquals(a, b))
    {
        return true;
    }

    // Just one object is null
    if (a == null || b == null)
    {
        return false;
    }

    if (a.GetType().IsArray &amp;&amp; b.GetType().IsArray)
    {
        if (a.Length == b.Length)
        {
            for (int i = 0; i &lt; a.Length; i++)
            {
                if (!ArraysEqual(a[i], b[i]))
                {
                    return false;
                }
            }
            return true;
        }
        return false;
    }

    // fall back to simple value compare
    return a == b;
}


Notice how, by doing the above, there is only one instance of each type of check.