Here's a more C#-ish way of doing what you did above:
static class ExecuteMultiple
{
public static bool Execute(params Func<bool>[] functions)
{
foreach (var function in functions)
{
if (function())
{
return false;
}
}
return true;
}
}
bool SomeFuncionNew()
{
bool bRetVal = false;
bRetVal = ExecuteMultiple.Execute
(
new Func<bool>[]
{
() => badResult1 = Foo1(),
() => badResult2 = Foo2()
}
);
if (!bRetVal)
{
}
return bRetVal;
}