What is the basic object-oriented principle?Design principles are basic tools. applying these rules can enable yourCodeIt is more flexible, easier to maintain, and easier to expand.
C # basic object-oriented principles
1. Compile APIs instead of
Extern and static can be used to modify variables and functions. What is the difference and usage.
1. Variables
By storage type, there are four types of variables in C language:
The auto keyword, which can be omitted. For example, int I; variable
What is expansion?
Extended stored procedures allow you to use external routines such as C to create your own. For users, the extended stored procedure and common stored procedure have the same execution method. Parameters can be passed to the
Last time I tested the function call speed evaluation for classes and struct (http://www.cnblogs.com/zyl910/archive/2011/09/19/2186623.html) and sealing classes (http://www.cnblogs.com/zyl910/archive/2011/09/20/2186622.html) respectively. Now we
Ah_bill has a lot of knowledge about Java, while C # has a look at it only because of work needs. C # is very similar to Java in syntax, at first, I was confused about delegation and events. I believe that most beginners have similar confusions.
When I was writing a program, I always felt that a field could meet the requirements. Why should I use attributes that are difficult to define?To define get and set, the Code volume is large and I really don't know their differences and
If you want to learn C # well #! You have to watch this! A lot of help!C # is regarded as a new language learning;. Read C # Getting Started classic and C # advanced programming.. Do not be confused by VC, BCB, BC, MC, TC and other words-they are
Http://hi.baidu.com/irenbest/blog/item/6353c7fdb3d77140d7887d13.html
Memory leakage detection in a window (taking the VC ++ environment as an example)
Flexibility and freedom are a major feature of the C language, but this feature also brings
Http://hi.baidu.com/ljy2008wl/blog/item/9990b01d37dee448f3de32b0.html
In C, side effect refers to the modification of data objects or files. For example, the following statement Var = 99;The side effect is to change the VaR value to 99. Evaluate the
A pointer to a String constant is different from a string array in use.See the following two functions:
// If the execution succeeds, "Hello world" is returned"Char * ptrchar (){Char * Pc = "Hello World ";Return * R;}// Execution error. Local
Calculate the factorial of 400
C/C ++ code
#define N 400long a[8916]={1,0},n,i,c,len; int main(void) { n=N; for ( len=1;n>1; n--) { for (c=0,i=0; i0)?len++:0; } for( len--,printf("%d",a[len--]);len>=0; len-
Sometimes we want to save the class instance for future use. An intuitive method is to write the class as one line, separate each attribute with \ t, and then read it with streamreader.
However, this is too troublesome. There are many lines of code,
C ++ C #============================================Word ushortDWORD uintUchar int/byte can be replaced by INT in most cases. If strict alignment is required, bytebyte should be used.Uchar * string/intptrUnsigned char * [financialas (unmanagedtype.
Generics can be used for classes or functions. For example
Generic Type:
Public class myclass {Public t myelement {Get; set ;}}
Generic functions:
Public t returnelement (){Throw new notimplementedexception ();}
However, when myelement
Some people have asked if they cocould take a look at the source for the webcam Vista sidebar gadget. after a little bit of cleaning up, I'm posting it now for you to take a look. here are some things worth mentioning:
1. uses the DirectShow. Net
First, we need to know whether the program memory has been leaked, and then find out which line of code has been leaked in order to fix it.
Of course, the simplest method is to use professional detection tools, such as boundscheck, which is very
Before writing a question, give a few keywords in Chinese and English, overload, override, and hide ). In early C ++ books, people who translate may not be familiar with professional terms (nor can they blame them. They are not engaged in computer
Perform scheduledownload and create a logger. The structure of this logger is as follows:
Code: select all
#ifdef _DEBUG#define LOGGER(log_level, filename, line, format, ...) \ logger_action(log_level, filename, line, format,
The first six digits of the 18-digit ID card represent the location of your household registration, and the seventh to 14th digits represent the year of birth, from 15th to 17th represents your gender (even numbers are female and odd numbers are
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