[Modify] Polish it

master
sta 6 years ago
parent 7a0b0db285
commit 2bde8d4d68

@ -1897,9 +1897,14 @@ 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)
for (long i = 0; i < n; i++) return;
action (i);
if (action == null)
return;
for (long i = 0; i < n; i++)
action (i);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save