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)