Three assemblies:
Main assembly: BaseApp.exe
Interface assembly: Ibaseapplication
Plug-in assemblies: Testattri
=======================================================================================
In the interface program:
Interface:
Copy Code code as follows:
Import Namespaces First
Using System.Runtime.InteropServices;
Preserve or open a section of the virtual address space of a specified process ... The memory region is initialized to 0 unless Mem_reset is used.
Copy Code code as follows:
Events: When the column width is changed
private void Columnwidthchange (object sender, Columnwidthchangingeventargs e)
{
If you're not adjusting to the first column, you don't care.
if (E.columnindex > 0) return;
Character Group: Various characters that can appear in the same seat.
To judge a numeric character with a regular expression:
Re. Search ("[0123456789]", charstr)!= None
where [0123456789] gives a regular expression as a string, he is a character
Application of Agent mode:
Remote proxies, which provide local representation for an object in different address spaces, can hide the fact that an object exists in different geological spaces.
Virtual proxies, creating expensive objects as needed,
1, in the initial stage of design, should be aware of the separation of the two layers, such as the data access layer, business logic layer, the presentation layer between the establishment of the appearance pattern, so that the subsystem can
The CLR allows an object to be converted to its actual type, or its base type.
In C #, an object can be implicitly converted to its base type, and converting an object to a derived type requires a display of the transformation. Cases:
Object o = new
WCF instance (with steps)
Copy Code code as follows:
This article is transferred from the Baidu document, I have tried, indeed can be used.
Take booking as an example to simply apply WCF
Create a new WCF service
If you use a database in your project, you'll definitely want to use a paging sort. Before doing database query optimization, I wrote the following code all night to stitch the SQL statement sorted by page
Copy Code code as follows:
The first time you run:
Second run time:
Copy Code code as follows:
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Using System.IO;
Namespace file operations
{
Class Program
{
When developing plug-ins, you need to use reflection, dynamically load the traversal assembly on the client, and invoke the method of each assembly.
To create a console application, first design an interface:
Public interface Isay
{
Cin:
When a space or newline character ' \ n ' is encountered, the input ends:
char a[10],b[10];
cout>a>>b;
cout
Cin.getline:
When a newline character ' \ n ' is encountered or the maximum number of characters that can be
1.mutable
In C + +, mutable is set to break the const limit. A variable modified by mutable will always be in a mutable state, and even in a const function, even if the struct variable or class object is const, its mutable member can be modified.
Max K product Problemset I is an n-bit decimal integer. If I is divided into K, we can get k integers. The product of this K-integer is called a K product of I. Try to design an algorithm, for given I and K, to find the maximum K product of
Why is the general algorithm so inefficient? That's because the main string pointer backtracking is too much:If the main string pointer does not backtrack, the speed will be faster, then we will think:How do I make the main string pointer not
What is a bitwise operation
Bitwise operators are operated in binary, which can only be used for integer-type operations. such as: Char,short,int,long
Bitwise operators are used to get high and low values
int a=0x1234;
int high,low;
High = (a>>8
Function Overload:
In C + + programs, several functions that are semantically and functionally similar can be represented by the same name, that is, the function overload.
Implementation of overloading:
Several overloaded functions with the same
In C + +, you can provide a default parameter for a function, so that when you call a function, the compiler will provide the default value for the parameter for the function, if you do not supply a parameter. The following is the principle of the
1. Although C + + is mainly a new language developed on the basis of C, she is not a substitute for C, it is not an upgrade of C, C + + and C are brotherly relations. No one is more advanced than the saying, the more important point is that C and C +
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