2023-02-16 12:57:06 +00:00
|
|
|
namespace InnovEnergy.Lib.Utils;
|
|
|
|
|
|
|
|
public static class ArrayExtensions
|
|
|
|
{
|
|
|
|
public static T[] Clear<T>(this T[] ts)
|
|
|
|
{
|
|
|
|
Array.Clear(ts, 0, ts.Length);
|
|
|
|
return ts;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static T[] Fill<T>(this T[] ts, T element)
|
|
|
|
{
|
|
|
|
Array.Fill(ts, element);
|
|
|
|
return ts;
|
|
|
|
}
|
2023-08-16 13:14:35 +00:00
|
|
|
|
|
|
|
public static IReadOnlyList<T> AsReadOnlyList<T>(this T[] ts) => ts;
|
2023-02-16 12:57:06 +00:00
|
|
|
}
|