This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18018|Reply: 2

[Communication] Today's C# Study Notes

[Copy link]
Posted on 1/22/2019 8:33:35 PM | | | |
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.








Previous:.net/c# uses xunit unit tests
Next:How background threads operate frame web pages
Posted on 1/23/2019 8:46:03 AM |
Not bad, keep up the good work~~
 Landlord| Posted on 1/23/2019 8:49:37 AM |
coolcalf Posted on 2019-1-23 08:46
Not bad, keep up the good work~~

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com