[Modify] Polish it

This commit is contained in:
sta 2019-09-08 22:11:09 +09:00
parent 4c82648c97
commit 7dae8486ad

View File

@ -1791,8 +1791,14 @@ namespace WebSocketSharp
/// </param>
public static void Times (this int n, Action action)
{
if (n > 0 && action != null)
((ulong) n).times (action);
if (n <= 0)
return;
if (action == null)
return;
for (int i = 0; i < n; i++)
action ();
}
/// <summary>