linq - How to determine if a sequence contains a specific element

Linq Contains Operator - How to determine if a sequence contains a given item
LinqContainsOperator.aspx

<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Linq" %>

<!DOCTYPE html>
<script runat="server">
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        string[] fruits = { "Mabolo", "Mandarine", "Mango", "Mangue", "Naranjo", "Patilla" };

        Boolean isContainsPatilla = (from f in fruits
                                   select f).Any(f => f.Contains("Patilla"));

        Boolean isContainsSusina = (from f in fruits
                                   select f).Any(f => f.StartsWith("Susina"));

        Label1.Text = "Fruits List: <br />";

        foreach (string names in fruits)
        {
            Label1.Text += names.ToString() + "<br />";
        }

        Label2.Text = "After Calling Contains Operator [Contains('Patilla')]: " + isContainsPatilla.ToString();
        Label2.Text += "<br /><br />After Calling Contains Operator [Contains('Susina')]: " + isContainsSusina.ToString();
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Linq Contains Operator - How to determine if a sequence contains a given item</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DarkBlue; font-style:italic;">
            Linq Standard Query Operator - Contains
            <br />How to determine if a sequence contains a given item
        </h2>
        <hr width="550" align="left" color="CornFlowerBlue" />
        <asp:Label
             ID="Label1"
             runat="server"
             Font-Size="X-Large"
             ForeColor="DarkGreen"
             Font-Italic="true"
             >
        </asp:Label>
        <br />
        <asp:Label
             ID="Label2"
             runat="server"
             Font-Size="X-Large"
             ForeColor="Red"
             Font-Italic="true"
             >
        </asp:Label>
        <br /><br />
        <asp:Button 
            ID="Button1"
            runat="server"
            OnClick="Button1_Click"
            Text="Test Linq Query Operator - Contains"
            Height="45"
            Font-Bold="true"
            ForeColor="DodgerBlue"
            />
    </div>
    </form>
</body>
</html>
More c# linq examples