C # random number generator (support for digital jumps)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.