This commit is contained in:
2022-12-15 23:29:02 +01:00
parent 95220bec08
commit 4f57b57a00
24 changed files with 1695 additions and 81 deletions

View File

@@ -12,6 +12,19 @@
this.max = max;
}
public int[] ToArray(bool includeMax = false)
{
var count = includeMax ? Length + 1 : Length;
var array = new int[count];
for (var i = 0; i < count; i++)
{
array[i] = min + i;
}
return array;
}
public override string ToString() => $"{{{min}, ..., {max}}}";
}
}