String to integer
Microsoft Visual Studio 2017 reverts to default settings 1. Visual Studio 2017 Select [Tools] 2. Select [Visual Studio Command Prompt] in the Tools menu 3. At this time, a command prompt window will pop up, enter devenv /resetsettings in the window In a moment you will see that Visual Studio 2017 has returned to its original state
How to open Visual Studio 2010 Command Prompt
WPF form attributes
Genus name | Explain | Tiltle | Indicates the title of the form | Icon | Represents the icon displayed in the upper left corner of the form | Cursor | Indicates the type of cursor used in the normal state of the form | WindowState | It means that the form is in a certain state of restore, maximize, or minimize | WindowStartupLocation | Indicates the position when the form is launched, and can be selected as the center of the screen, the center of the parent form, or the default position | WindowStyle | Represents the border style of the form | Width | Represents the width of the form in pixels | Height | Indicates the height of the form in pixels | MinWidth | Represents the minimum width of the form in pixels | MinHeight | Represents the minimum height of the form in pixels | MaxWidth | Represents the maximum width of the form in pixels | MaxHeight | Indicates the maximum height of the form in pixels | Top | Represents the position of the upper edge of the form relative to the desktop, in pixels | Left | Represents the position of the left edge of the form relative to the desktop, in pixels | FontFamily | Indicates the font on the form, such as Song font, bold font, etc | FontSize | Indicates the size of the font on the form | FontStretch | Indicates how compressed or expanded the font on the form | FontStyle | Indicates the style of the font on the form | FontWeight | Indicates the thickness of the font on the form | Foreground | Indicates the brush in the form used to draw the foreground color | Background | Indicates the brush in the form used to draw the background color | BorderBrush | Indicates the brush in the form that is used to draw the background of the border | BorderThickness | Represents the width of the border in the form in pixels | Margin | Indicates the outer margin of the form | Padding | Indicates the inside margin of the form | ResizeMode | Sets whether the current window can be resized manually |
C# Time Interval Calculation (Using TimeSpan Class)
It contains the following four constructors:
TimeSpan(Int64) initializes a new instance of the TimeSpan structure to the specified number of ticks.
DateTime.Tick:是计算机的一个计时周期,单位是一百纳秒,即一千万分之一秒)
TimeSpan(Int32, Int32, Int32) initializes a new instance of the TimeSpan structure to the specified number of hours, minutes, and seconds.
TimeSpan(Int32, Int32, Int32, Int32) initializes a new instance of the TimeSpan structure to the specified number of days, hours, minutes, and seconds.
TimeSpan (Int32, Int3 effect: 2, Int32, Int32, Int32) initializes the new TimeSpan structure to the specified number of days, hours, minutes, seconds, and milliseconds.
Demo:
VS2017 Debugging Tips
This is the most basic operation, presumably everyone will be able to do it... We can click on this place in the editor:
Add a breakpoint to the code so that when the code is executed here, the process will be suspended, and the code will pause execution and wait for the user to act.
How to proceed? You can continue by pressing one of the following shortcuts: F5 (continue executing until the breakpoint is encountered again, or press Ctrl+Alt+Break to forcibly interrupt) F10 (step over, continue to execute, but hang again on the next line, regardless of whether there is a breakpoint in the next line) F11 (step in, the same effect as step over, but if the current pending position is a function, the next step will go into the function) Shift+F11 (step out, execute to return to the current function)
The effective scope of the pendant This suspension is effective for the entire process, which means that all threads will be paused. Pending status:
What you can do when you hang up Back to top View or modify the value of a variable As shown in the figure, when the mouse pointer points to the variable name, you can view or modify the value of the variable, and press enter to confirm after modification. The operation is limited to variables within the scope of the current location.
|