mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
parent
28f46ecc8d
commit
31e4574732
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using X10D.RandomExtensions;
|
||||||
|
|
||||||
namespace X10D.ListExtensions
|
namespace X10D.ListExtensions
|
||||||
{
|
{
|
||||||
@ -33,7 +34,7 @@ namespace X10D.ListExtensions
|
|||||||
throw new ArgumentNullException(nameof(source));
|
throw new ArgumentNullException(nameof(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
random ??= RandomExtensions.Random;
|
random ??= RandomExtensions.RandomExtensions.Random;
|
||||||
return random.NextFrom(source);
|
return random.NextFrom(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ namespace X10D.ListExtensions
|
|||||||
throw new ArgumentNullException(nameof(source));
|
throw new ArgumentNullException(nameof(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
random ??= RandomExtensions.Random;
|
random ??= RandomExtensions.RandomExtensions.Random;
|
||||||
|
|
||||||
var count = source.Count;
|
var count = source.Count;
|
||||||
while (count > 0)
|
while (count > 0)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace X10D
|
namespace X10D.RandomExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extension methods for <see cref="Random" />.
|
/// Extension methods for <see cref="Random" />.
|
Loading…
Reference in New Issue
Block a user