Calculate strides to run up stairs
You have one exception for different parameters and I believe it is wrong. You should separate validation of each argument and also use clear message instead of just "something is out of range".

Also I recommend to use ArgumentOutOfRangeException only for arguments that represent single value that is out of range. Length of an array argument is not an argument itself. Some invalid value inside the array is not an argument too.

So define validation methods

private bool IsStairsSizeValid(byte[] stairs)
{
    return stairs.Length &gt;= 1 &amp;&amp; stairs.Length &lt;= 50;
}

private bool AreStairsValuesValid(byte[] stairs)
{
    return stairs.All(nextFlight =&gt; nextFlight &gt;= 5 &amp;&amp; nextFlight &lt;= 30);
}

private bool IsStrideValid(byte stride)
{
    return stride &gt;= 2 &amp;&amp; stride &lt;= 5;
}


and then use them

if (!IsStairsSizeValid(stairs))
{
    throw new ArgumentException("Stairs has invalid size.", nameof(stairs));
}

if (!AreStairsValuesValid(stairs))
{
    throw new ArgumentException("Stairs contains invalid value.", nameof(stairs));
}

if (!IsStrideValid(stride))
{
    throw new ArgumentOutOfRangeException(nameof(stride), stride, "Stride is out of range.");
}


Also you should always check arguments of reference type on null in public API:

if (stairs == null)
{
    throw new ArgumentNullException(nameof(stairs));
}




I don't see any reason the numberOfStrides variable should have byte type. You use it within integer calculations so there is no point in byte. Declare it as int and remove casting to byte in the loop.

int numberOfStrides = 0;
foreach (var flight in stairs)
{
    numberOfStrides += flight / stride;




If you have division and remainder calculation for the same values it can be better to use Math.DivRem method:

numberOfStrides += Math.DivRem(flight / stride, out var remainder);
if (remainder != 0)
{
    numberOfStrides++;
}




There is no need to store result of calculations to local variable if you return it immidiately. So you can write just

return (ushort)(numberOfStrides + (stairs.Length - 1) * 2);