Today with the doctrine in preparation for a party, there is a random number lottery to make the link, want me to make a random number generator, preferably the kind of start after the number of jumps, the key after the pause.
This thing has no technical content, put in C + + is also a random thing, I can not give someone a console program. So I wrote one in C #.
When writing a small problem, is to display a slight delay, want to use C # inside the Tread.sleep () function, but found that the interface program is stuck, will cause the thread to block.
The following methods have been used to solve the problem:
private void delay (int millisecond)//delay system time, but the system can perform other tasks simultaneously; { DateTime current = DateTime.Now; while, current. Addmilliseconds (millisecond) > DateTime.Now) { application.doevents ();//Transfer Control } return;
The other is nothing to say, make out the interface as follows, simple rude.
Students who are in need can use it.
SOURCE on Github
Programs that can run directly http://download.csdn.net/detail/nk_test/9311997
C # random number generator (support for digital jumps)