C # parameter type
◆ Value parameter: it does not contain any modifier. The parameters in the method are copies of real parameters. Changes in the parameters do not affect the values of real parameters in the memory. Real parameters are safe.
◆
I found many questions about the development of multithreading in Windows Mobile and window Embedded ce in csdn. I wrote down the general practice blog.
Definition
Define the thread handle and thread ID in the class definition
Handle
1. getchar: read characters from the keyboard (note that it is not a string)
2. putchar: display characters on the screen (note that it is not a string)
# Include Void main (){Int L;Do{L = getchar ();Putchar (L );}While (L! = '\ N ');}3. Gets
Assume that we have the following extension method:
Public Static VoidLockexec (ThisT OBJ, Action action)WhereT:Class{Lock(OBJ){Action (OBJ );}}
We use this extension method to write down the followingCode:
static void testinsert ( bool
For project needs, use components developed by VC by other project teams, in the Web BackgroundCodeYou cannot access this component, so you have to use the background to call the front-end JavaScript to operate this component. I searched for it
Static private bool isoneinstance (){# If! DebugBool one;Mutex = new system. Threading. mutex (true, "vipshop", out one );Return one;# ElseReturn true;# Endif}
If (isoneinstance ()){Application. Run (New loginfrm ());}Else{MessageBox. Show
Lessons learned
I am busy submitting versions before Christmas, and the encoding volume is greatly increased, with an average of 2,300 lines, sometimes thousands of lines. Code directly without design. Because it is related to some devices, output
///
/// Determine whether a file is using a function
///
/// name of the file to be determined
/// bool Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Public static bool IsFileInUse
Using System;Using System. Collections. Generic;Using System. ComponentModel;Using System. Data;Using System. Drawing;Using System. Text;Using System. Windows. Forms;
Using System. IO;Namespace ModifyFileName{/// /// The program written to modify
Public partial class ToastForm: Form {// // display millisecond // private int _ wait_ms = 1000; public ToastForm (double seconds, string text, Form parent): this (seconds, text, parent, Color. blue, 15, ContentAlignment. topCenter) {} public
View Code
1 # region enumeration public conversion class 2 public class EnumDescConverter: System. componentModel. enumConverter 3 {4 protected System. type m_MyVal; 5 public static string GetEnumDescription (Enum value) 6 {7 FieldInfo fi = value.
I. Program Design: when the cat shouted, all the mice started to escape and the host was awakened.
Requirement: first, the interaction between the mouse and the host is passive. Second, considering scalability, the call of a cat may cause other
You need to extract usable URLs from some irregular addresses;
C # Regular Expression
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->String firsturl = "http://www.herosoft.com,
Principle 16: do not create invalid objects.
To sum up, there are three points:
1. It still takes time to create and destroy heap objects.
For example
Protected override void OnPaint (PaintEventArgs e) {// Bad. created the same font every paint
# Include # Include
Struct flex{Int count;Double average;Double scores []; // defines a scalable Array}; // Declare the struct
Void showFlex (const struct flex * p); // defines the Function
Int main (void){Struct flex * pf1, * pf2;
Int n = 5; //
Summary of parameters passed between forms:
Solution 1: The form is a class. You can define global variables in the Form class. The type is public and static.
Example: public static string str = "";
Note that it is a static variable. If it
The methods for calling DLL in each programming language are different. Here we will only introduce the methods for calling DLL with C. First, you need to know what is managed and what is not managed. It is generally considered that the unmanaged
Using System. Data. SqlClient;
Public class sqlServerConnection {
//
Public static void Main (){
// The following is the standard connection. Note that the SERVER is my computer name. SQLEXPRESS is a database instance. SSPI indicates the account
This refers to the call in linux. C and C ++ call Lua is slightly different, reflected in:
1. methods included in the header file
Direct include in C
1 #include 2 #include 3 #include
Add extern "c" to C ++"
1 extern "C"2 {3 #include 4 #include 5
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