Jump to content


Check out our Community Blogs

BenasG

Member Since 24 Apr 2012
Offline Last Active Jun 07 2012 03:08 AM
-----

#629189 Random Integer Except Some Numbers

Posted by BenasG on 06 May 2012 - 11:47 AM

Hello, I want to generate number from 1 to 21, but also want that random function skip some numbers like 5, 7, 13, 16.
I using this code:
private int RandomNumber(int min, int max)
	    {
		    Random random = new Random();
		    return random.Next(min, max);
	    }

and this for get number
do
		    {
			    nubmer = RandomNumber(1, 21);
		    } while ((number == 5) || (number == 7) || (number == 13) || (number == 16))
Okey, problem is, that this generation method call stackoverflown error.
  • 1


#628579 Check For Label Color

Posted by BenasG on 29 April 2012 - 10:42 AM

Hello, everybody!

Maybe anyone knows how to check label color?
For example, I have already set label color to red and when running program I want to check the label color.

Solved!
  • 1


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download