Today I read Anders's interview with C #4.0, and I feel that C #4.0 is a forced thing.
In today's era of Dynamic Language, Ruby, JavaScript, XML, and other dynamic languages are widely used in various places, while C # Is a static language, how to
During this time, I started to look at the design mode. I just looked at the singleton mode. The most concise method to achieve it is:
Class
Singleton
{ Public Static Readonly Singleton instance = New Singleton (); Private
// Sort arrays with only characters, private string [] AA = {"A", "C", "B"}; array. sort (AA); MessageBox. show (AA [0]); MessageBox. show (AA [1]); MessageBox. show (AA [2]); Result: A, B, C
If you want to implement
Array. Sort (ARR );No !!!!!!!
1. What is reflection?2. Relationships between namespaces and accessories3. What is the purpose of obtaining type information during runtime?4. How to Use reflection to obtain the type5. How to dynamically create objects based on types6. How to
Many non-generic collection classes have their corresponding generic collection classes. Below are common non-generic collection classes and their generic collection classes:
Non-generic collection class
Generic collection class
In my understanding, generics are like a bag that can hold everything. we certainly don't want to use this bag to pack delicious food and garbage. for example, if you go to the supermarket to buy a package of cookies, the waiter will give you a bag
Many non-generic collection classes we use mainly include the arraylist class and the hashtable class. We often use hashtable to store the information to be written to the database or returned. In this case, we need to constantly convert the data
Class program {static void main (string [] ARGs) {console. writeline (next ("abc123def345ghi"); console. read ();} Private Static string next (string s) {If (! Isnumber (S. substring (S. length-1, 1) S = S + "0"; matchcollection coll = RegEx.
In. net, the callable DLL (Dynamic Link Library) file is actually a class library.
We can write a class and compile it into a DLL file. In other projects, we can directly call the compiled DLL file, instead of repeatedly writing this
/// set the horizontal center of the continuous area /// /// worksheet /// Start Cell // end cell Public void sethaligncenter (Excel. _ worksheet cursheet, object objstartcell, object objendcell) {cursheet. get_range (objstartcell, objendcell
In the process of developing winfrom with C. Progress bars are often used to display progress information. At this time, we may need to use multiple threads. If we do not use multiple threads to control the progress bar, the window will easily be
1. Description
Attribute provides a powerful way to link declarative information with C #Code(Type, method, attribute, etc.) are associated. Attribute andProgramAfter object Association, you can use the technology "reflection" to query attributes
The following describes the regular expressions in C #. The regular expressions in C # are contained in a namespace of the. NET base record. The namespace is System. Text. RegularExpressions. The namespace contains eight classes, one enumeration,
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