Record the basic knowledge of C # Transfer Data summarization between winform windows: In winform applications, data transfer between windows is one of the most popular applications, especially in management software. There are multiple ways to transmit window data. In this article, we will mainly explain how to transmit data using delegation. In this example, there are two forms: one main form frmmain, receives data; the other child form frmchild, transmits data. The UI is as follows: in the main form, the [set] button, in the pop-up window, enter the corresponding value in the text box, click [OK] to return to the main form, and return data to the main form. Specific generation... read the full text
Posted @ 2009-10-24 inforasc read (807) | comment (9) Edit
Asynchronous delegation Abstract: This article describes how to use the backgroundworker component to Implement Asynchronous calls in winform programming. This article describes how to use the delegate to Implement Asynchronous calls. The following description is excerpted from msdn: asynchronous delegation provides the ability to call synchronous Methods asynchronously. When the delegate is synchronously called, The invoke () method calls the target method directly to the current thread. When the delegate is asynchronously called, the CLR queues the request and immediately returns it to the caller, the target party will be called for the thread from the thread pool... read the full text
Posted @ 2009-10-21 inforasc read (270) | comment (2) Edit
Basic knowledge of delegation Abstract: A delegate is a data structure that references static methods or reference class instances and Their instance methods (msdn). A delegate type declaration establishes an agreement, the Protocol points to the signature of one or more methods. The delegate is object-oriented and type-safe. 1. Simple Example of delegate: the keyword "delegate" is required for the delegate declaration. The delegate name is arbitrary, but the delegate must match the method signature it points to: return type; number and type of parameters namespace consoleapplicatio... read the full text
Posted @ 2009-10-14 inforasc read (120) | comment (0) Edit
Abstract: In the past few days, combined with the reflector tool, the basic knowledge of the generic set has been learned, and several notes have been written continuously, today, we continue to learn about queue, mainly by using reflector to view its internal implementation, to deepen our understanding of basic knowledge: 1. Queue <t> queue, indicates the object's first-in-first-out set (msdn) 2. Main private member variables: Private T [] _ array; // queue storage and operations are implemented based on this array private... read the full text
Posted @ 2009-10-06 10:34 inforasc read (224) | comment (0) Edit
Stack summary of a generic set: 1. namespace: system. collections. generic (Assembly: mscorlib) 2. Description: 1). A set of LIFO instances with variable size. 2) Stack is implemented as an array. 3) stack capacity refers to the number of elements that can be saved. When adding elements to the stack, the internal array is reassigned and the capacity is automatically increased as needed. 4). You can receive null references (nothing in VB). 3. Create and initialize a null reference. 1) stack & L... read the full text.
Posted @ 2009-10-05 inforasc read (147) | comment (0) Edit
List Summary of generic sets: 1. namespace: system. collections. generic (Assembly: mscorlib) 2. Description: 1) indicates a list of strong types of objects that can be accessed through indexes. It is used to search, sort, and operate the list. 2) is the generic equivalent class of the arraylist class. 3) You can use an integer index to access the elements in this set. The index starts from scratch. 4). You can receive null references (nothing in VB ). 5) Allow repeated elements. 3. Read the full text.
Posted @ 2009-10-04 inforasc read (172) | comment (2) Edit
Dictionary summary of a generic set: 1. namespace: system. collections. generic (Assembly: mscorlib) 2. Description: 1). ing from a group of keys to a group of values, each add item is composed of a value and its associated keys. 2) any key must be unique. 3) the key cannot be null reference null (nothing in VB ), if the value is of reference type, it can be null value 4), key and value can be of any type (string, Int, Cust... read the full text