In C # development, multi-layer system architecture can simplify system development. Currently, three-tier petshop System Architecture Design and four-tier duwamish architecture are available.
The following are some useful references:
Duwamish
Int num = 1000000;
B = new B ();
B [] arr = new B [num];
B [] Mmm = new B [num];
For (INT I = 0; I {
Arr [I] = new B ();
// The following two sentencesCodeYou can select only one sentence and run it. view it in the task manager.ProgramMemory
1.
String fun1 ()
{String num = "ly ";Return num;}// InProgramWhen this method is used, no error is reported, because although num is released after the method is executed, the value of num is saved to a temporary storage unit, then copy the
Really benevolent, wise: too many methods, such as WCF, remoting, socket, and COM +.
Remoting is suitable for LAN development.
Socket (self-developed, requires a higher level), WebServices (Standard Protocol) is suitable for Wan development.
COM +
Compile CProgramAs follows:
# Include "stdio. H"
_ Declspec (dllexport) void myfun (){Printf ("this is a dll \ n ");}
Save, named my. c
Run the vs command to prompt the CL/C path/My. c
My. obj is generated after running, which is in the
When writing a winForm program, it is inevitable to use the DataGrid. Naturally, you need to set the column format, title, and so on! However, the column title is often set and does not respond, Which is disgusting!
I have made a program over the
# Define _ LIBRARY __# include
# Include time. h>/** we need this inline-forking from kernel space will result * in no copy on write (!!!), Until an execve is executed. this * is no problem, but for the stack. this is handled by not letting *
Code /// /// obtain the names of all objects in the specified folder /// /// specify the folder name, absolute path /// filter file types based on the file suffix, for example :*,*. txt ,*. xls /// include subfolders /// ArrayList array,
I am working on a small tool recently. the two-dimensional array and staggered array data calculated in. NET are imported into the Excel file and searched in the blog garden. Many predecessors have already pasted well-developed code. I made some
I just got started with json and found it interesting. I just used c # as an example to play with it. Here I will record it.
Json data format:
{"Id": 20547, "Name": "central south university", "NameEn": "central-south university", "AreaId": 190 },{ "
In development, we often encounter thread examples. If a background operation is time-consuming, we can start a thread to execute that time-consuming operation, and the program continues to execute. In some cases, synchronization and collaboration
Public static void StartProgram (string directory, string fileName) {Process mainprocess = new Process (); mainprocess. startInfo. workingDirectory = directory; mainprocess. startInfo. fileName = fileName; // you do not need to specify the above
Server programs
Using System;Using System. Net;Using System. Net. Sockets;Using System. Text;Namespace SocketServer{/// /// Summary of Class1./// Class Class1{/// /// Main entry point of the application./// // Define the port numberPrivate const int
Void merge (slnodetype * headA, slnodestype * headB){Slnodetype * tempA, * tempB, * temp;TempA = headA;TempB = headB;// Loop the elements in each A and put the elements in B that are smaller than the elements in A before them.While (tempA-> next! =
First, the two classes have different working principles: the string class is a traditional string modification method. When you add a string to another string, the system first writes the two strings to the memory, delete the original string object,
Method 1In unicode strings, the range of Chinese characters is 4E00 .. 9FFF: CJK uniied Ideographs.
Determine whether the character is Chinese by determining the unicode encoding of the character.
Protected
Bool IsChineseLetter
(String input, int
1. params
ParamsYou can specify the parameter's method parameter when the number of parameters is variable. In the method declaration, only oneParamsKeyword, which is the last parameter.
Using System;
Class App{Public static void UseParams (params
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