1.When a parameter is passed to a method through an applicationThe called method obtains this variable, so any changes made to the variable within the method still play a role after the method exits.
2.When a parameter is passed to a method through
Nicolas C. zakas summarized in writing efficient JavaScript as follows:
Management scope is very important because it takes more time to access non-local variables than local variables. Avoid using the growth scope chain structure, such
1. Obtain the path of the current file
1.
System. Diagnostics. process. getcurrentprocess (). mainmodule. filename
Obtain the complete path of the module, including the file name.
2.
System. environment. currentdirectory
Obtain
Math. CellSyntax: Math. Cell (X );Parameter: X is a value or expression.Description: return the approximate integer of the given parameter. The near-dummy value is the value rounded up and obtained. The approximate value is an integer greater than
1. Read-Only field: the value of a variable should not be changed. Its value is unknown before running.
The readonly keyword that allows a field to be set as a constant. You can perform some operations to determine its initial value. The rule is:
1. string is a reference type, but it differs from the reference type in common operations:
If you modify one of the strings, A New String object is created, and the other string is not changed.
Using system;
Namespace consoleapplication2
{
Public String someproperty
{
// Get accessors do not contain parameters and must return the type of attribute Declaration
Get
{
Return "this is the property value ";
}
// The set accessors do not contain any display parameters, but the compiler
The const field can only be initialized in the declaration of this field; The readonly field can be initialized in the Declaration or constructor. Therefore, the readonly field may have different values based on the constructors used.
The const
1. foreach statement
C # The Compiler converts the foreach statement to the methods and attributes of the ienumerable interface.
1 foreach (Person p in persons)2 {3 Console.WriteLine(p);4 }
The foreach statement is parsed into the following code
1. inherited types:
Implement inheritance: indicates all member fields and functions of a base type derived from a base type. Each function of the derived type uses the implementation code of the base type unless the implementation code of the
The interface name starts with the letter I to know that this is an interface
Derived from the interface is completely independent from the derived from the class
When declaring an interface member, you only need to specify the name and parameters
Event: an event is a message sent by an object, which notifies the customer of an operation. This operation may be caused by a mouse click or triggered by some other program logic. The sender of an event does not need to know which object or method
Array class implements the Bubble Sorting of elements in the array. The sort () method requires the implementation of the icomparable interface by elements in the array.
System. String and system. int32 implement the icomparable interface, so you
If you draw images in the form, no matter whether the dual cache is used or not, you will see that the images will continuously flash during update, the solution is to add the following three lines of code to the constructor of the form:
Add the
Source http://www.cnblogs.com/waw/archive/2011/11/02/2233067.html
Use the C # code to implement the "up, left, right" dock function similar to the QQ form
By Wu Aiwei, 1712 visits, add to favorites, Edit
Intended audience: entry level, old bird
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