random.Next(0,5)
It never returns the 5 (but sometimes returns the 0.) Why? I thought these are just boundary values that can be returned. Thanks>
This has been written a long time ago but I will comment anyway. I think the main reason for that design decision is that most if not all random number generator at their core generate numbers from 0 to 2^32-1. So if you specify Int32.MaxValue you will never get that number. Having an exception for one number must have been not acceptable to the designers so they decided to have the bracket exclusive. Problem solved!