I used a MessageBox.Show() on each step where problem might have been and sure enough I found out what it was :)
Sadly an empty array created with "int[] array = new int[number]" is filled with zeros in C#, not null. I think in C++ it wasn't like that, but could be wrong. And I have a check for...
So here's the function that generates the numbers:
private void generateRandomNumbers(object sender, EventArgs e)
{
if ((this.numbersAmountInputBox.Text != null) && (this.rangeFromInputBox.Text != null) && (this.rangeToInputBox.Text != null))
{...
Hello everyone,
I'm kind of new to C# in general (only made a few console apps around two years ago) and am making a Random Number Generator app for Windows. Everything works perfectly except one thing:
Whenever I enter 0 as the lower bound and tick the checkbox to include it (so the result can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.