Change value of member of class which is contained in the list
<p>I have this class <code>Variables</code> </p>

<pre><code>public class Variables
{

    public enum DataType
    {
        INT, CHAR, BOOL, FLOAT
    }

    public string Name { get; set; }
    public DataType Type { get; set; }
    public object Value { get; set; }

    public Variables(string name, DataType type, object value)
    {
        Name = name;
        Type = type;
        Value = value;
    }

}
</code></pre>

<p>It is also assumed that <code>Name</code> is <em>unique</em>. And inside another class I have a list of variables, <code>List&lt;Variables&gt;</code></p>

<pre><code>public void Main()
{
    List&lt;Variables&gt; varList = new List&lt;Variables&gt;();
    varList.Add(new Variables("x",DataType.BOOL, true));
    varList.Add(new Variables("y",DataType.BOOL, false));
    varList.Add(new Variables("z",DataType.BOOL, true));
    varList.Add(new Variables("a",DataType.INT, 1));
    varList.Add(new Variables("b",DataType.INT, 10));

    // I need this to convert into LiNQ.
    foreach (Variables _x in varList)
    {
        if (_x.Name == "z")
        {
            _x.Value = false;
        }
    }
}
</code></pre>

<p>How can I convert <code>foreach</code> into <code>LiNQ</code>? I tried <code>.Where</code>, <code>.Select</code> but they return <code>IEnumerable</code>. Is there a <code>LinQ</code> method that returns only a single value that matches to a given condition? eg,</p>

<pre><code>Variables _var = varList.MethodName(LambDa Expression).....
</code></pre>
