/// /// String truncation method/// /// truncation character /// intercept Len when it is greater than len /// Public string Substr (string str, int len){If (! String. IsNullOrEmpty (str )){System. Text. RegularExpressions. Regex rChinese = new
Quick sorting:
An Improvement on Bubble sorting based on the grouping policy. For a sequence to be sorted, sort the selected value and place it to the correct position. Then, the position field is used to sort the Left and Right Parts. Until the
Using System;Using System. Collections. Generic;Using System. Text;Using System. Runtime. InteropServices;Namespace Fengyun{Public class Win32{# Region modify local system time[DllImport ("Kernel32.dll")]Private extern static void GetSystemTime (ref
1. LINQ to XML classThe System. Xml. Linq namespace contains 19 classes. The following table lists their names and descriptions:
Class DescriptionXAttribute represents an XML property XCData represents a CDATA text node XComment represents an XML
Asynchronous delegation provides the ability to call synchronous Methods asynchronously. When a delegate is synchronously called, the "Invoke" method calls the target method directly to the current thread. If the compiler supports asynchronous
Collection classes with dynamically increased length, such as ArrayList and Queue, do not need to specify their capacity during initialization. The set itself can automatically increase the set size as needed, making it easy for programming. However,
I recently learned how to use c # to implement multi-threaded download, and finally let me google some materials. The following is a copy of the Code:Namespace Microshaoft. Utils{Using System;Using System. IO;Using System. Net;Using System.
Main Code of the called TestDll. dll file:
Using System;
Using System. Collections. Generic;
Using System. Text;
Namespace TestDll
{
Public class TestDll
{
Public string HandleStr (string str)
{
Return "[" + str + "]";
}
}
}
Code for calling the
Enum is an enumeration type. It is the same as struct, int, single, and double. It belongs to the value type and is stored in the stack. It does not need to allocate internal space when it is created, so it is good for program performance.
Why
In my understanding, an interface is used to identify the type of a class.
For example, if there is an Interface: an animal, whether it is the class: cat, dog, ox, etc,
As long as it inherits the animal interface, it is necessary to implement the
Windows Forms DataGridView datagridoes not provide the function of merging cells. to merge cells, use Graphics. DrawLine and Graphics. DrawString in the CellPainting event to "Draw ".The following code merges cells with the same content in the 1st
Import the dll that contains the Domino namespace: Interop. Domino. dll.
Install the notes client.
Accessing domino starts with creating a NotesSession object. So the first problem is the initialization of the NotesSession object. The Initialize
Today we will introduce the traversal sorting method in C #. Today we will introduce the bubble method, direct Insertion Method and selection sorting method.
1. Bubble Method
Question: Use the Bubble Method to sort elements in the array from small
1 public interface IEnumerable2 {3 // IEnumerable has only one method, and returns the number of enumerations that can access the set cyclically.4 IEnumerator GetEnumerator ();5}6 public interface IEnumerator7 {8 // Method9 // move to the next
The System. Collections. ArrayList class is a special array. By adding and deleting elements, You can dynamically change the length of the array.
I. Advantages
1. Supports automatic resizing.
2. Flexible element insertion
3. Flexible deletion of
Class that implements the IEnumerable interface. It supports the foreach loop to traverse the collection elements of objects.IEnumerable:IEnumerator GetEnumerator () returns the number of enumerations that can access the set
C # (asp.net) Regular Expressions are very important in programming and development, and are easy to ignore for some programmers. This is mainly for commonly used c # (asp.net) regular Expressions can be found online. But for a Senior Programmer,
Below is a registry operation class written in C #. You are welcome to make a picture!
1. Static domain of the registry key
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 /// 2 // static domain
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