linq - How to get single element of a sequence that match condition

How to use Linq Single operator with condition
LinqSingleOperatorWithCondition.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 = { "Dragon eye", "Fico comune", "Gewone peer", "Guayaba manzana", "Kiwi fruit" };

        var val = from f in fruits
                  select f;

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

        Label2.Text = "After Calling Single Operator With Condition [StartsWith('Gewone')]: <br />";
        Label2.Text += val.Single(f => f.StartsWith("Gewone"));
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to use Linq Single operator with condition</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:DarkBlue; font-style:italic;">
            Linq Standard Query Operator: Element Operator - Single With Condition
            <br />How to get the single element of a sequence
        </h2>
        <hr width="650" align="left" color="CornFlowerBlue" />
        <asp:Label
             ID="Label1"
             runat="server"
             Font-Size="X-Large"
             ForeColor="OrangeRed"
             Font-Italic="true"
             >
        </asp:Label>
        <br />
        <asp:Label
             ID="Label2"
             runat="server"
             Font-Size="X-Large"
             ForeColor="SkyBlue"
             Font-Italic="true"
             >
        </asp:Label>
        <br /><br />
        <asp:Button 
            ID="Button1"
            runat="server"
            OnClick="Button1_Click"
            Text="Test Linq Query Operator - Single"
            Height="45"
            Font-Bold="true"
            ForeColor="DodgerBlue"
            />
    </div>
    </form>
</body>
</html>
More c# linq examples