In C #, class and type member modifiers include public, private, protected, and internal.
Modifier for public class and type members
Modifier for private type members
Modifier of the protected type member
Modifier for internal class and type
Debugging SectionCode(The project is not small, and it is not convenient to put it all up)A strange phenomenon occurs: five variables are defined. When the last variable is modified, the first variable also changes. I am as follows:
This is the
Functions in the Delphi dynamic link library are defined:
Function
Encrypt (
Const
Orignstr, key: pchar; newstr, errstr: pchar): Boolean; stdcall;
This saves thousands of Characters in the failed attempt process. Only the following method is
A considerable portion of the current web pages are used
Ajax Technically, neither WebClient nor httprequest in C # can get the correct results, because these scripts are executed after the server sends them!
However, it is normal when we use
1. This. Close (); only closes the current window. If it is not the main form, it cannot exit.ProgramIn addition, if there is a hosting thread (not the main thread), it cannot exit cleanly;
2. Application. Exit (); force all messages to stop and
MFC, ATL, and CLR are the three built-in libraries of vc2005, covering various development methods and applications of windows. Of course, there are more than three libraries for C ++ development, but these three are recommended by Microsoft. From
Bubble Sorting should be the easiest sort to implementAlgorithm. The basic idea is: Compare the adjacent two numbers in sequence, put the decimal points in front, and put the large numbers in the back. That is, in the first step: first compare the
C #
1: Get the number of days of the specified monthInt Days = DateTime. DaysInMonth (Year, Month); // Year indicates the Year and Month indicates the Month.2: Number of days in the current monthInt idate = System. DateTime. DaysInMonth (System.
String is a special data type, which is both a primitive type and a reference type. during compilation and running ,. net has done some optimization work on it. The formal optimization work will sometimes confuse programmers and make people doubt
If the brackets that follow the brackets contain the form parameter, the post-single-object operator is overloaded, and the invisible parameter is the pre-single-object operator.
# Include
Using namespace std;
// Create a clock class
Class
The Code is as follows:
Using System;Using System. Reflection;Using System. Reflection. Emit;
Public class TestReflection {Private String file = @ "TestReflection.exe ";
Static void Main (String [] args ){TestReflection test = new TestReflection ();
The following three classes of System. Diagnostics can help us diagnose applications:
Debug
Trace
EventLog
When creating a VS project, VS defines the Trace and Debug symbols for us. The difference between them is that the Trace is also valid in
When creating a C/S project, you can use the database connection information in the logon window. It is the server, uid, pwd. When the user enters the corresponding database connection information during the First Login, it will be saved to an xml
When writing the K-means algorithm today, you need to read the initialization cluster center point entered in the console (that is, some numbers). The reading method is to read one line, separated by spaces, and press enter to end. Example: "1_2_3 ..
We often encounter this problem when writing C # windows applications. How can we transmit data between two forms? The following are my online methods. I encountered an actual problem: open a form2 window in form1 as the input interface, convert the
From: http://hi.baidu.com/lm_lemon/blog/item/af81e8ec08e532252cf534ba.html
Newtonsoft. Json. dll is required for DoNet2.0.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Using
1. while (0) Two usage, one is for jump, one is for macro
2. declare that the external variable in the variable uses extern and that the register variable is register.
3. static global variables and static local variables. The difference is that
1. while (0) Two usage, one is for jump, one is for macro
2. declare that the external variable in the variable uses extern and that the register variable is register.
3. static global variables and static local variables. The difference is that
This is very useful. For example, permissions and execution status can all be saved to the database in an int type. enumeration can be used in C # to solve this problem.
[Flags]public enum Permission { create = 1, read = 2,
Recently, I participated in some projects to develop facebook-related applications. Due to access difficulties in China, it is difficult to search and test related materials. At first, I only made some simple calls, for example, you need to open
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