1. Queue Definition
The System. Collections. Queue class indicates the object's first-in-first-out set. objects stored in the Queue are inserted at one end and removed from the other end.2. Advantages
1. sequential processing of sets (first-in-first-
1. dynamic ExpandoObjectAnyone familiar with js knows that js can be written like this:
1
var t =
new
Object();
2
t.Abc = ‘something’;
3
t.Value = 243;
We can also use this js Dynamic Language Feature in c #, provided that a variable is
You must have used or read"Singleton.The following three implementation methods are provided, and the advantages and disadvantages are given respectively.
Method 1:
Code highlighting produced by Actipro CodeHighlighter
Before discussing this issue, we should first understand the idea that communication between threads is through sending signals. (This is not nonsense)
First, we will discuss ManualResetEvent. During the discussion, I will introduce some
Private void button2_Click (object sender, EventArgs e){// Remove the specified character at the beginning and end of the stringString MyInfo = "-- People's Republic of China --";// Display "People's Republic of China"MessageBox. Show (MyInfo. Trim (
C # by default, no interactive interface is provided when a windows service is created. Neither form nor console can be displayed. However, you can enable desktop interaction in the service to start >>> run >> services. msc> select your windows
This major company needs to update the exchange rate every day for foreign trade. Previously there was a service that could be called, but that connection was useless, so I wrote something like this to capture the webpage display information.
Code
Solutions to problems:
1. Microsoft Picture Clip Control, version 6.0 cannot be found in COM components.
Solution: Download PICCLP32.OCX and register regsvr32 c: windowssystem32PICCLP32. OCX (because I copied this file to c: windowssystem32)
2.
When calling an unmanaged function in C #, many functions need to use the address of the object defined in C #. Therefore, the GCHandle class is used.
Usage:
DWORD ReadCert (UNT_DEV_HANDLE hDev,BYTE * pbCert,DWORD * pdwCertLen,DWORD dwFlag );
///
Public class IpHelper{// Core method: IP search/// /// Find the region where the IP is located and make sure that the web. config contains the IPData or BackIpData configuration section./// /// IP /// Public static IpLocation GetIpLocation (string
1), Framework1.1. How to display a tray icon prompt with the close button?
I was able to find a simple answer. Instead of using:
TaskbarIcon.ShowBalloonTip(10000);
I cocould use the second form of this
In C # learning, it is easy to confuse the use of virtual and abstract methods. Now let's discuss the differences between them. Both of them involve the use of override in a derived class.1. Virtual Method)Virtual keywords are used to modify methods
Obtain the installed software and path through the registry. Instance code:
Using (RegistryKey key = Registry. LocalMachine. OpenSubKey (@ "SoftwareMicrosoftWindowsCurrentVersionUninstall", false )){If (key! = Null) // determines whether an object
/// /// Truncate a string by byte length (supports truncate a string with HTML code style)/// /// string parameter to be truncated /// truncated bytes /// string added at the end of the string /// returns the truncated string Public string
1. Any programming language has related data types. C # is no exception. Its basic data types include int, short, long, float, double, and string. Data types can be converted to each other. However, during the conversion process, note that small
In C #, new and override are two frequently used keywords in inheritance, but they are often easy to confuse the functions of these two keywords.
New
C # The new Keyword indicates hiding. It indicates that an attribute or function with the new
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