[Modify] Polish it
This commit is contained in:
parent
77d67feaf9
commit
072e7f9a82
@ -1871,7 +1871,12 @@ namespace WebSocketSharp
|
|||||||
/// </param>
|
/// </param>
|
||||||
public static void Times (this int n, Action<int> action)
|
public static void Times (this int n, Action<int> action)
|
||||||
{
|
{
|
||||||
if (n > 0 && action != null)
|
if (n <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (action == null)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
action (i);
|
action (i);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user