Talk (Bubble sort)

Source: Internet
Author: User

1.string can only be thought of as a char array (char[]) and is read-only and is implemented by the indexer, giving only the read-only get indexer.
2. Open a link in WinForm: System.Diagnostics.Process.Start ("url");
3.winform load a picture by code for PictureBox: Image.FromFile ("Picture path");
4. Disable the tab order for a button: simply set the TabStop property of the control to false.
This. Size.Width:winform width of the form (with the length of the border line)
This. ClientSize.Height:winform height of the form region (excluding the height of the title bar)
5. Each form has a default confirmation button (press ENTER, AcceptButton) and a default Cancel button (CancelButton when ESC is pressed)

6.txtnum1.selectionstart, the start position of the cursor in the text box, or the position where the cursor is located if not.
7. When converting a char to Int32, do not directly tune Int.parse (' 1 ') or Convert.ToInt32 (' 1 '), at which point the ASCII value is taken, not the "corresponding value", but should first be converted to a string re-tune, Convert.ToInt32 (' 1 '. ToString ()).

The Timer class in 8.stopwatch,winform.
The 9.WinForm form has a resize event that is triggered when the size of the form changes.
The Anchor property of a 10.WinForm form control (many controls have, such as button buttons), which keeps the distance around the form intact; Dock properties (Docking)

11. Bubble sort: To sort from large to small, we make 22 comparisons with <, and vice versa.
for (int i=0;i<number.length-1;i++)//number of traversed elements
{
for (int j=0;j<number.length-1-i;j++)//number of times
{
22 comparison, from large to small with "<" number.
}
}

Talk (Bubble sort)

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.