linq - How to determine if all items in a sequence match condition

Linq All Operator - How to determine if all items in a sequence meet a condition
LinqAllOperator.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 = { "Abricotier", "Abrikoos", "Actinidia", "Aguacate", "Alupag", "Anguria" };

        Boolean isStratWithA = (from f in fruits
                                select f).All(f => f.StartsWith("A"));

        Boolean isStratWithB = (from f in fruits
                                select f).All(f => f.StartsWith("B"));

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

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

        Label2.Text = "After Calling All Operator [StartsWith('A')]: " + isStratWithA.ToString();
        Label2.Text += "<br /><br />After Calling All Operator [StartsWith('B')]: " + isStratWithB.ToString();
    }
</script>

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