What is the equivalent of Java's .length for arrays in C#?
<p>I'm new to C#, and I'm trying to convert this code from java into C#.</p>

<pre><code>    static public double euclidean_2(double[] x, double[] y)
    {
        if (x.length != y.length) throw new RuntimeException("Arguments must have same number of dimensions.");

        double cumssq = 0.0;
        for (int i = 0; i &lt; x.length; i++)
            cumssq += (x[i] - y[i]) * (x[i] - y[i]);

        return cumssq;
    }
</code></pre>

<p>I know java uses .length but what is the equivalent in C# since I keep getting an error</p>

<p>Thanks</p>
