[Modify] Polish it
This commit is contained in:
parent
4c82648c97
commit
7dae8486ad
@ -1791,8 +1791,14 @@ namespace WebSocketSharp
|
|||||||
/// </param>
|
/// </param>
|
||||||
public static void Times (this int n, Action action)
|
public static void Times (this int n, Action action)
|
||||||
{
|
{
|
||||||
if (n > 0 && action != null)
|
if (n <= 0)
|
||||||
((ulong) n).times (action);
|
return;
|
||||||
|
|
||||||
|
if (action == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
action ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user