Use C # To find duplicate data in the data and delete the array repeated items. Personally, if the array is not very large, it is still the fastest to replace it with regular expressions. The principle is to sort and repeat with regular expressions.
C # Write forward matching Word SegmentationAlgorithmThe idea is very simple. Each time you extract a word from a string, you can configure the length of the word yourself. For example, in this article,
The post-deviation means that when a word is
PrivateSelf-AccessProtectedYou and the derived class can accessPublicAnyone can access
The above is the access permission of the three, which plays a great role in the encapsulation of C ++, but we also have an artifact: Friend.
What is friend? It
Access Control modifiers of C # are divided into six types, which can be used as follows:
1. Default:Class
2. Public:ClassProgramIntra-SetSubclassOutside assembly
3. Private:Class
4. interval:ClassIn the AssemblySubclass
5. protected:Class
C # without the concept of global variables, we can share variables only through static.
Example:
The function Declaration requires the ref Keyword: public static void a (ref int I ){}
A function call also requires the ref Keyword: A (ref 4 );
The representation of a One-Dimension Array in C # is the same as that in Java, but the two-dimensional or above arrays are different. The following is a description.
We know the example of two-dimensional array representation in Java is as follows:
The keyword used by the namespace is namespace, which can be nested with each other.
Benefits of using namespaces:
1. Code can be distributed across multiple files, that is, the same namespace can be stored in different files step by step.
2. The
Int A = 7;
Long B;
B = A; // the implicit conversion is successful, indicating that the low part can be converted to the high part.
A = B; // implicit conversion fails, indicating that the upper part cannot be converted to the lower part.
A =
1. Select fill in blank questions (2 points for each blank question, totally 60 points)
1. Select () when operating the SQL Server database ().
A) SQL Server. NET Framework data provider;
B) OLE DB. NET Framework data provider;
C) ODBC. NET
Using system;Using system. Collections. Generic;Using system. text;Using system. IO;Using system. net. networkinformation;Using system. Threading;Namespace manager. Common{Public static class netcommon {/// /// Verify the correctness of the IP
Recently, I was so busy that I participated in the development of Iot projects (two people, PM and I) and maintenance of software products. Yesterday I received an emergency response, A small piece of code about the value of bank card swiping (the
Today, we will start to create ActiveX plug-ins.
1
2. Put a text box and a button temporarily. click the button to display the information to the text box.
3. Change the "Project properties-Application-assembly information" Settings and check
Today, I accidentally looked at the new features of C #4.0. The first new features made me very excited, the "Dead parameter" problem that once caused me to use C # is finally fixed.It's so cool!
In the past, C ++ and VB were used. net is very nice.
It is not clear why Microsoft has provided distinct extension to the generic list, but it has to pass a compare parameter. Why is it not a delegate?It's troublesome. Only that interface can be implemented...Code
Code highlighting produced by
First, there is an interesting thing: how to access virtual functions in objects without using objects? Let's look at the following code:
1 # include 2 using namespace STD; 3 4 typedef void (* Fun) (void); // function pointer 5 6 class A {7 public:
Today, I lost my fortune. I sent an email about function definition to the project team email list, discussing the function definition in the following form:
#includevoid function(arg1, arg2)int arg1;int arg2;{ printf("arg1=%d, arg2=%d", arg1,
Object-oriented core: encapsulation, inheritance, and polymorphism. Polymorphism is divided into polymorphism during compilation and Runtime polymorphism.
Polymorphism during compilation (static Association): implemented using function
1 #include 2 using namespace std; 3 4 class Father{ 5 6 public: 7 ~Father(){ 8 coutFather *f = new Son();22 delete f;23 24 system("pause");25 26 return 0;27 }
In the above Code, the parent class pointer is used to point to
Part 1 basic functions
Chapter 1 Types and declarations
1.Name. The name used for a large scope should be a longer and clearer name, such as vector, window_with_border, and department_number. However, if you only use short and familiar names such
The Code is as follows. Draw a graph to the window and the result is only a black rectangle:
1 Bitmap bmp = (Bitmap)Bitmap.FromFile(@"C:\Users\Ken\Desktop\Load2.bmp"); 2 Graphics grDest = Graphics.FromHwnd(pictureBox1.Handle); 3 Graphics grSrc =
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