Created
March 31, 2010 14:23
-
-
Save PJensen/350382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Computes scalar result from collection of booleans | |
/// </summary> | |
/// <param name="aBooleans">Array of booleans to be aggregated</param> | |
/// <returns>The aggregation of all booleans; | |
/// <value>true if all true, false if otherwise.</value> | |
/// </returns> | |
public bool aggregateBooleans(bool[] aBooleans) | |
{ | |
bool tmpReturn = true; | |
foreach (bool iBool in aBooleans) | |
tmpReturn &= iBool; | |
return tmpReturn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment