Initialization of list with lambdas causes high IL cyclomatic complexity: why, and how remove this complexity? For example following code causes the static constructor of the class (which is actually compiler generated) to be very complex: 1 + the list count.
static List<Predicate<string>> list = new List<Predicate<string>>()
{
s => s == null,
s=> s.StartsWith(“R”),
... With a lot of predicates like that ….
};
Note: complexity is computed with NDepend