int divisor = AllMyControls.Where(p => p.IsActiveUserControlChecked).Count()
or simply
int divisor = AllMyControls.Count(p => p.IsActiveUserControlChecked);
Since you are a beginner, it would be worthwhile to take a look at Enumerable
documentation
More Related Contents:
- Can’t use Count() in C#
- Count property vs Count() method?
- Return max repeated item in list
- Prevent duplicates from array, based on condition [closed]
- Where is likely the performance bug here? [closed]
- Combining two expressions (Expression)
- What guarantees are there on the run-time complexity (Big-O) of LINQ methods?
- How to do a subquery in LINQ?
- Bulk-deleting in LINQ to Entities
- LINQ: Not Any vs All Don’t
- Linq select objects in list where exists IN (A,B,C)
- Could not find an implementation of the query pattern
- Does Distinct() method keep original ordering of sequence intact?
- What is the Efficiency and Performance of LINQ and Lambda Expression in .Net?
- ascending/descending in LINQ – can one change the order via parameter?
- Using LINQ to concatenate strings
- C# Pass Lambda Expression as Method Parameter
- LINQ, Unable to create a constant value of type XXX. Only primitive types or enumeration types are supported in this context
- Multiple WHERE Clauses with LINQ extension methods
- Serialize an object to XElement and Deserialize it in memory
- LINQ to SQL in and not in
- Linq – What is the quickest way to find out deferred execution or not?
- Access the value of a member expression
- Check if list contains item from other list in EntityFramework
- Add the where clause dynamically in Entity Framework
- Split a List into groups of consecutive numbers [closed]
- Keep Getting ‘The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities’ Exception
- linq: order by random
- Select distinct rows from datatable in Linq
- Map two lists into a dictionary in C#