///
/// Class designed to give information/// About the current system/// Public static class Environment{# Region Public Static Properties/// /// Name of the machine running the app/// Public static string MachineName{Get {return System.
/// /// Obtain the value between the start and end strings./// /// string /// Start /// end /// Public static string GetValue (string str, string s, string e){Regex rg = new Regex ("(? Return rg. Match (str). Value;}
From fanwa Software
Recently, I encountered a performance problem that is so frustrating. There is a table in the production environment with 0.7 million data records. The result shows that it takes 3.5 seconds to execute a statement, whether it is a query that matches
Obtain the remaining disk space on the remote computer. The disk on the remote computer to be obtained may be shared or not shared. If it is shared, you can get what you want without having too many permissions.
1 ///
2 // obtain the remaining
Looking back at the development history of C #, C #1.0 completely imitates Java and retains some features of C/C ++, such as struct, Which is easy for new scholars to use; C #2.0 has added generics, which is exactly the same as Java 3.0's generics.
After dragging, we found two methods:
1,
Private Point myPoint;Private void form=mousemove (object sender, MouseEventArgs e){If (e. Button = MouseButtons. Left){Point myPosition = Control. MousePosition;MyPosition. Offset (myPoint. X, myPoint. Y
During the development process, static methods are called by adding a vertex after the type name and then the name of the called method. The method called for a type instance is called by a new object, add the method name, which is the most familiar
Wow, hey, a variety of abnormal needs, this time the entire boot automatically runs the program. Don't say I'm bad. Hey hey, C # can also start to run the drip automatically. It's starting, wow, the whole blue screen, or the whole black screen, it's
We usually perform automatic software updates. We need to compare the version numbers of the New and Old files. if the version number of the new file is higher than that of the old one, we will replace the old one. (The version number is generally
Packing and unpacking are the operations to convert the value type and the reference type.
1. Boxing occurs when the value type is converted to the reference type
2. unpacking occurs when the reference type is converted to the value type
It is not
Use the MySql connector net component to operate the MYSQL database:
Using System;
Using System. Collections. Generic;
Using System. ComponentModel;
Using System. Data;
Using System. Drawing;
Using System. Linq;
Using System. Text;
Using
In C #, you can use the WebClient class and WebRequest class to obtain the webpage source code. The following describes the implementation of these two methods.WebClient class to obtain webpage source codeWebClient classThe WebClient class is
Using System;
Using System. Collections. Generic;
Using System. Text;
Using System. Drawing;
Using System. ComponentModel;
Using System. Windows. Forms;
Namespace Line
{
Public class LineControl: Control
{
Private LineType m_lineType = LineType.
What is conjecture input?
When we use a query application, the phrase associated with this keyword is automatically displayed under the text box after a keyword is entered for selection, saving us time for input, this is the hypothetical input,
When talking about threads, we should be familiar with them. Similar to him, there is also a Process concept ). First, familiarize yourself with their concepts and relationships.
What is a process?
When a program starts to run, it is a process,
When I developed a small log program and saved the log file to HTML, operations on the file are inevitable. I wrote a file operation class HtmlOption for all HTML operations.
Using System;
Using System. Collections. Generic;
Using System.
Add the reference assembly Microsoft. Office. Interop. Excel
Declare using Excel = Microsoft. Office. Interop. Excel;
And the POST method:
// Export the data of the DataGridView Excel FilePrivate void ExportExcel (string fileName, DataGridView myDGV)
1. Create a thread Thread thread = new Thread (new ThreadStart (SortAscending )); 2. Start the thread Thread. Start (); 3. Terminate the threadIf you want a process to end, one way is to complete the thread's entry function execution, but in many
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