// Declare a delegate
Public Delegate string addhandler (int A, string B); // you need to specify the number of parameters here. In this example, there are only two parameters.
Void calls asynchronous (){
Addhandler handler = new addhandler
I. Stack and stack
InProgramDuring runtime, its data is stored in the memory. WhileTypeDetermines how much memory a data item needs, where it is stored, and how it is stored. The running program uses two memory areas to store data-stack and heap.
Since the corresponding ASCII code value can be obtained based on letters, you can consider how to obtain the corresponding letter based on the given ASCII code? Developers can use the getstring method in the ASCII encoding method in the system.
The storage sequence should be managed when stored in the stack, and the principle of going out is maintained. It is a continuous memory domain with automatic distribution and maintenance.
The heap is unordered. It is a non-sequential memory domain,
I used to use VB to program inputbox. Now I have learned C # and cannot find it ...... I found it on the Internet, and now I am contributing to you:
1. First, add the reference Microsoft. VisualBasic2. Namespace using Microsoft. VisualBasic;3.
1. Obtain the complete path of the current process, including the file name (process name ).
This. GetType (). Assembly. location;
Return format: X: \ XXX \ xxx.exe
2. Obtain the complete path of the new process component and associate it with the
Public class test{Public static int cc = 0;Static Test (){CC ++;}Public test (){CC ++;}}
Test T1 = new test1 ();
Test t2 = new Test2 ();
Output: CC: 3
Analysis:1: The static constructor neither has an access modifier nor a parameter. Because
Valid C #
Chapter 1 C # Language Elements
Item 1: Always use proPerties. Do not use accessible data members.Item 2: Always use readonly instead of Const.Item 3: Do not use forced conversion when type is changed. Use the is or as operator.Item 4:
Valid C #
Chapter 1 C # Language Elements
Item 1: Always use proPerties. Do not use accessible data members.Item 2: Always use readonly instead of Const.Item 3: Do not use forced conversion when type is changed. Use the is or as operator.Item 4: Use
1. dataset, datatable, datarow, and datacolumn
1. Add a able to dataset.
Dataset. Tables. Add (datatable)
Instance:
Dataset DS = new dataset ();
Datatable table = new datatable ("Student table ");
DS. Tables. Add (table );2. Read the datatable from
It's also old.
Recently used
Record to avoid forgetting
To download an image, you must first have an image address.
To have an image address, you must first analyze the URL under the webpage
Two methods are generally used to download a webpage.
1.
If the database is MSSQL, if only the time or date is inserted, the database inserts the complete date and time format by default, in this way, all the date and time are displayed by default when you use the data sensing control to display the time.
First, introduce necessary namespaces.
using System.Windows.Forms; using System.Net;
Next, drag a picturebox control into the form and set its sizemode to autosize. Drag a timer control.
Then write the code in the form
This system is only used to give you a better understanding of the underlying communication protocols.
The chat function is implemented by using the TCP protocol through socket.
Chat Server: chatserver
Chat client: chatclient
--- Chat is listened
Abstract modifier of the abstract class. Example: public abstract class name
Abstract classes cannot be instantiated.
An abstract class can be inherited. However, if an abstract class contains an abstract method (with an abstract modifier), the
Virtual functions are added before this function declaration.In this way, this function can be overwritten in its derived class (subclass ).
When the subclass overwrites the virtual function of the parent class, override must be explicitly added.
To enable an object to support the. NET serialization service, you must add the [serializable] feature to each associated class. If some members of the class are not suitable for serialization (for example, password fields), you can add the
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