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