How to compare values foreach inside a foreach
<p>How would like to to compare values in this nested foreach.
    I want to compare and if they match print YES for example.
Cheers</p>

<pre><code>using System;

class Program
{
    static void Main()
    {
        // Use a string array to loop over.
        string[] ferns =
        {
            "apple",
            "Equisetopsida",
            "Marattiopsida",
            "Polypodiopsida"
        };

        string[] fruits=
        {
            "apple",
            "mango",
            "Marattiopsida",
            "Polypodiopsida"
        };
        // Loop with the foreach keyword.
        foreach (string value in ferns)
        {
            Console.WriteLine(value);

            foreach (string value in fruits)
            {
                Console.WriteLine(value);
            }

            //I would like to compare values here.
            //Compare frens values against fruits values.
            //How can i achieve this


        }
    }
}
</code></pre>
