Saxonite 1.2.11.6

This commit is contained in:
Andy Howard
2024-06-14 17:39:25 +01:00
parent 14102d5164
commit 7eb7dc55d6
2 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -1,4 +1,5 @@
using System;
using Sarand.Net.Standard.Base.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -74,6 +75,15 @@ namespace Sarand.Net.Standard.Base.Utils
return true;
}
//-------------------------------------------------------------------
/// <summary>
/// Sort the list into random order.
/// </summary>
public static List<T> Randomise<T>(this List<T> values)
{
return values.OrderBy(_ => SacsRandomHelper.GetInt32(Int32.MaxValue)).ToList();
}
//-------------------------------------------------------------------
/// <summary>
/// Remove the specified range of items from the list to a new list.