phase 2
This commit is contained in:
@@ -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}}}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user