Generic-full manual C #2.0

Non-generic class (system. Collections) Corresponding generic class (system. Collections. Generic) Arraylist List Hashtable Dictionary Queue Queue Stack Stack Sortedlist

Use the mediatypenames class to view the pre-defined mime in. Net (C #).

The system. net. Mime. mediatypenames class contains the pre-defined MIME type in. Net (in the form of string constants). This class of subclass contains a class of mime, such as application: ApplicationProgram, Image: graphic image, text: text.  

. Net (C #): modifies the performance of default assert in debugging or tracing.

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

. Net (C #): the object-formatterservice. getuninitializedobject method is not initialized using constructors.

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

. Net (C #): LINQ identifies repeated and non-repeated Elements

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 []

C language library function rename

Function Introduction Function: rename a file. Usage: int Rename (char * oldname, char * newname ); Header file: Use stdio. h or IO. h in Visual C ++ 6.0 Note: this function can be used to move files. You can change the drive letter of the

C # multi-thread Learning (2) how to manipulate a thread

Next we will create a thread. When using the Thread class to create a thread, we only need to provide the thread entry. (Thread entry enablingProgramKnow what to do with this thread) In C #, the thread entry is provided through the threadstart

C # process example

For security considerations, the company imposes permission restrictions on the Windows operating system used by employees. If you want to install additional software on your own machine, you need to contact the system administrator! It feels quite

C # generic classes for calling stored procedures

Using system; Using system. Collections. Generic; Using system. text; Using system. Data. sqlclient; Using system. collections; Using system. Data; // Abstract: Data Access assistant.// Author: zhiqiao// Date: 2008/07/02Namespace zhiqiao.

C # obtain the input (unsigned char * and char *) of the serial port device *)

Because it is C #, the platform must be. net. Previously, the password and keyboard operations were required for a small business. In fact, it is a simple operation to get the user's password, and there is no big problem, but there are still a lot

Use sendmessage in C # To send a key combination to a non-top form

The following is an example: For example, send Alt + F The following is the message content captured with spy ++: 000310dc P wm_syskeydown failed rtkey: vk_menu crepeat: 1 scancode: 38 fextended: 0 faltdown: 1 frepeat: 0 FUP: 0 000310dc P

C # Dynamically Retrieve the color of the mouse position

API declaration: /// /// obtain the device scenario of the specified window // /// obtain the window of the device scenario. If the value is 0, you need to obtain the device scenario handle of the entire screen DC /// specified window, error: 0

Microsoft translation of the free book "Introducing Microsoft LINQ" chapter3.4, 3.5-attributes of C #3.0 irrelevant to visual basic9.0, this chapter summarizes

This book is intended for personal learning and knowledge sharing. The copyright of this book is owned by the original author. If there is any infringement, please inform me that I will handle the post immediately.Reprinting is allowed, but this

C # optimizing string operations)

1. Convert. toint32 and int32.parse2. Three Methods of split3. What is the difference between @ "ABC" and "ABC "?4. retain two valid decimal places and rounding them5. url-based Chinese delivery solution6. Convert 123456789 to 12-345-67893Method7.

C # In winfrom, the application only starts code once.

Static class Program{Private const int ws_shownormal = 1;[Dllimport ("user32.dll")]Private Static extern bool showwindowasync (intptr hwnd, int cmdshow );[Dllimport ("user32.dll")]Private Static extern bool setforegroundwindow (intptr hwnd );/// ///

. Net (C #): emit creates a dynamic method with ref/out

Update: For the out parameter, we recommend that you read this article: . Net (C #): more thorough understanding of out parameters from Il and Reflection emit This document describes how to create two dynamic methods using the dynamicmethod type,

. Net (C #): the puzzling name and equals of regioninfo

When I used three methods to create regioninfo for the same country, I thought they were all equal, but I didn't expect this to happen. Let's look at the Code: Use "ZH-CN", "cn" and 2052 (lcid) to create China's regioninfo. And check if they are all

. Net (C #): defineparameter method of dynamicmethod and methodbuilder

When defining emit dynamic methods, the dynamicmethod and methodbuilder defineparameter methods are not required, because after all, when constructing dynamicmethod or methodbuilder, You need to specify the return value type and parameter type of

. Net (C #) Configuration System: Use configurationelement. deserializeelement to read attributes in XML Element format

Suppose there is such a simple configurationsection type (there is only one ID attribute ): Class mysection: configurationsection { [Configurationproperty ("ID")] Public int ID { Get {return (INT) This ["ID"];} Set {This ["ID"] = value

. Net (C #): HMAC)

HMAC: hash-based message authentication code can also be easily implemented in. net.   In the current. NET Framework (. NET 4.0) HMAC is located in the following position: HMAC inherits from hashalgorithm, which represents an abstract hash

Total Pages: 5902 1 .... 4039 4040 4041 4042 4043 .... 5902 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.