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>
When you just look in Google for "c# random" and follow the first links to the method of desire you get here: http://msdn.microsoft.com/en-us/library/aa329893(v=vs.71).aspx
And there is no hint about the exclusiveness of the upper bound. They must have found the mistake in the code and corrected it with documentation.
So it is important to always check the version of the framework when looking at the documentation. Even when working with old versions of the framework, it is worth to have a look at the newer documentation.