wasSharp – Diff between revs 46 and 47
?pathlinks?
Rev 46 | Rev 47 | |||
---|---|---|---|---|
Line 23... | Line 23... | |||
23 | /// <param name="default">the function to execute when no case matches</param> |
23 | /// <param name="default">the function to execute when no case matches</param> |
|
24 | /// <param name="case">a list of predicates representing the switch cases, |
24 | /// <param name="case">a list of predicates representing the switch cases, |
|
25 | /// where each predicate has to return True or False indicating whether |
25 | /// where each predicate has to return True or False indicating whether |
|
26 | /// fallthrough should occur. |
26 | /// fallthrough should occur. |
|
27 | /// </param> |
27 | /// </param> |
|
- | 28 | /// <remarks>when used, the default action must be explicitly specified |
||
- | 29 | /// due to language restrictions |
||
- | 30 | /// </remarks> |
||
28 | public static void Switch<T>(this IEnumerable<T> query, |
31 | public static void Switch<T>(this IEnumerable<T> query, |
|
29 | // default |
32 | // default |
|
30 | Action<T> @default, |
33 | Action<T> @default, |
|
31 | // case |
34 | // case |
|
32 | // case |
35 | // case |