LINQ Query returning all original objects
As the other answers stated your given code does do the same thing, but could give performance issues for big collections since the entire collection is traversed when calling Count().

The following code should solve this:

var distinct = actions.Distinct();
uxButton.Enabled = distinct.Take( 2 ).Count() == 1;


Perhaps you could turn this into an extension method:

uxButton.Enabled = actions.Distinct().CountOf( 1 );




It seemed useful, so I added it to my library, along with a unit test.

/// &lt;summary&gt;
///   Returns whether the sequence contains a certain amount of elements.
/// &lt;/summary&gt;
/// &lt;typeparam name = "T"&gt;The type of the elements of the input sequence.&lt;/typeparam&gt;
/// &lt;param name = "source"&gt;The source for this extension method.&lt;/param&gt;
/// &lt;param name = "count"&gt;The amount of elements the sequence should contain.&lt;/param&gt;
/// &lt;returns&gt;
///   True when the sequence contains the specified amount of elements, false otherwise.
////&lt;/returns&gt;
public static bool CountOf&lt;T&gt;( this IEnumerable&lt;T&gt; source, int count )
{
    Contract.Requires( source != null );
    Contract.Requires( count &gt;= 0 );

    return source.Take( count + 1 ).Count() == count;
}