In some cases, for example, when a user needs to enter a Chinese name, it is necessary to verify whether all the user input is in Chinese. In this case, using regular expressions is an ideal choice.
The following shows the implementation method:
Version: 0.0001.0002.00003
1. Normal requirements:
The obtained version number is 0.1.2.3.
Assembly. getexecutingassembly (). getname (). version. tostring ();
========================================================== ================
2.
String S = "test text, just write some text"; foreach (char C in S) { textbox1.appendtext (C. tostring (); int tick = environment. tickcount; // interval. As per your preferences, I will write 100 milliseconds while (environment. tickcount-tick }
Ah ~ Speechless
I know a lot of things apart, and I don't know them together.
Take notes honestly and accumulate learning.
Today, I have my own ideas. These simple things are designed to make yourself a habit.
Class, not to mention the
# Region image capturing // // generate a new image from the captured part of the image /// /// original image /// generate a new image /// width /// screenshot height // X coordinate // screenshot y coordinate Public St
1. New Project-ServiceProgram
2. Gray window, attribute window servecename, and name your service.
3,CodeMode, onstart, add the following code:
Filestream FS = new filestream (@ "D:/mcwindowsservice.txt", filemode. openorcreate, fileaccess.
When I was playing Windows 98
ComputerWhen the connection starts, the network connection test is normal, and the command "ping.exe" is often used. It feels quite practical.
Now the dig command is used to detect the network. Net is helpful for
// *********** The following code uses sendKey to open the notepad and write information, save, close the example ***************** private void button8_click (Object sender, eventargs E) { process TXT = process. start (@ "notepad.exe", @
Using system; using system. io; using system. text; using system. runtime. interopservices; class inifilehandler { [dllimport ("kernel32.dll")] Public static extern uint getprivateprofilestring (string lpappname, string lpkeyname, string
Use C # To implement the simple Ping function, which is used to test whether the network is connected
1. Obtain the host name based on the IP address
/// /// Obtain the host name based on the IP address/// /// Host IP address /// host name Public
// Set alowdrop to true in form attributesPrivate void form1_dragenter (Object sender, drageventargs E){If (E. Data. getdata (dataformats. filedrop )! = NULL){E. effect = dragdropeffects. copy;}
// The following code does not support the selected
The quick sorting mainly uses a temporary bucket to store a fulcrum, and uses the Fulcrum as the comparison standard. The two sequences of size are divided on both sides of the Fulcrum. Then, recursive the two sequences.
/// /// Quick sorting/// ///
How to enable the keyboard to control picturebox.
1. Select form and view attributes: Set keypreview to true;2. Select form and view the event (lightning symbol next to the property): double-click the keydown event to edit the code.
Private void
Normally, winform cannot obtain the returned value of exe. In this case, I use the method to write the value in EXE to the CSV file, and then winform reads the CSV file.
Private void btngoodsselect_click (Object sender, eventargs
[System.Runtime.InteropServices.DllImport("user32.dll ")]
public
static
extern
int
SetWindowLong(IntPtr hWnd,
int
nIndex,
int
wndproc);
[System.Runtime.InteropServices.DllImport(
"user32.dll "
)]
public
static
ex
Private void button#click (Object sender, eventargs E){/*** The form must include:* Button: Click* A text box control: loads text content* A pic box file: the copied Image Content**/Idataobject idata = clipboard. getdataobject ();If (idata.
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