Note:
The trace class is used as an example, but the debug class is also common.
Trace. Listeners is a system. Diagnostics. defaulttracelistener type by default. This type of listener will pop up a dialog box during assertion, as shown
Formatterservice (in system. runtime. in the serialization namespace), The getuninitializedobject method is. methods used by CLR initialization objects in. Net deserialization (as we all know, constructors of objects in deserialization are not
The trick is to use the groupby method of LINQ, and then use the Count attribute of the returned result igrouping interface to determine whether it is a repeated element.
Code:
// Repeated elements: 3, 4, 5
// Unique elements:, 9
int []
Previous ArticleArticle:. Net (C #) platform call: dllimportattribute. charset and character string sending encoding. This section describes the relationships between the character string and dllimportattribute. charset during platform call. In fact,
The value and switchsettings attributes of the system. Diagnostics. Switch class are protected modifiers and can be set. Value is a string type, and switchsetting is an int type. The value of the switch class is the value attribute. After the value
For clickonce applicationsProgramYou can use activationcontext to activate the context. This class provides access to the Application List (application manifest. Appdomain. activationcontext can be used to obtain the activation context of the
In the previous articleArticle:. Net (C #): The signhash and verifyhash of RSA. I mentioned that using signhash and verifyhash of RSA can also achieve signdata and verifydata. In fact, there is also a method for signature authentication of public
Let's look at the output of a long number in. Net:
// + Using system. Globalization;
// + Using system. Threading;
// Change the current thread's cultureinfo to Chinese-China"
Thread. currentthread. currentculture = cultureinfo. getcultureinfo
Note:
To run the code, you must add a reference to system. configuration. Install. dll.
The installation configuration class is in the system. configuration. Install namespace.
Transactedinstaller is like a transaction in a database. The whole
Using getcursorpos as an example, it returns the position of the current mouse pointer on the screen (with a point structure ).
For definitions of getcursorpos and point, refer to msdn:
Http://msdn.microsoft.com/en-us/library/ms648390 (V = vs.85).
As we all know, loading referenced assembly is not all loaded when the program starts running. CLR loads the corresponding Assembly for the first time when the type of the Assembly is used. More specifically, when a method is JIT, the CLR ensures
Study the differences between the three regular regexoptions enumerated values for matching rows, corresponding to none, singleline (single row) and Multiline (multi-row) enumerated values.
Conclusion:
None :(.) match any character except \ n. ^
Directory
1. Configure redirection for a single assembly
2. issuer policy assembly
3. Frequent version updates during development and testing
Returned directory1. Configure redirection for a single assembly
When a single dependent
The streamingcontext type appears in many serialization methods. Getobjectdata of iserializable and special Constructor (used for deserialization ). There are also [ondeserialized], [ondeserializing], [onserialized], [onserializing] feature flag
We know that appdomain. processexit can monitor the exit of the current process, while the process. exited event can only monitor the exit of other processes. And it does not happen if the process is forced to end appdomain. processexit. To sum up
The trygetvalue method is very commonly used. You can convert the "judgment key existence" and "according to the key value" steps into one step. In this way, the hash value of the key is calculated only once, which is very efficient. Note that the
In fact, semaphore in. NET is an integer maintained by the operating system. When the integer is 0. Other threads cannot enter. When the integer is greater than 0, the thread can enter. Every time a thread enters, the integer is-1, and the integer
There is a range attribute in the HTTP request header information that can be used to request files in some HTTP requests. In. net, the range of data is defined using the httpwebrequest. addrange method.
After an HTTP request with the range
The data size in a computer is generally measured in bytes. The data type is usually long and is converted to a readable unit string. For example, 1 kb is displayed in 1024 bytes. 1024*1024 bytes, 1 MB ......
Google searched for half a day and
Concurrentbag is very fast for adding and deleting the same thread value, because concurrentbag stores data independently based on the thread ID, therefore, it is very fast for a thread to remove data from its own data. Of course, if there is no
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