/*
Author: Jiangong SUN
*/
1. Duplicated code
Extract method or Extract class
2. Long method
Extract method, replace temp variable by query, Parameter object (DTO), Replace method by method object,
3. Large class
Extract class, extract
Datagridview is the most complex control in. net. It is very difficult to compile a universal Datagridview (similar to the datatable in JSF) because of various table formats.
In the Datagridview, you can program rows, columns, and cells. For
Include
Main (){Int I;Char * suffix [] = {"st", "nd", "rd "};Char * item [] = {"Unix", "cat", "sed", "awk", "grep", "ed", "vi "}; Printf ("In the beginning, there was nothing. \ n ");For (I = 0; I Printf ("And on the % d % s day, God created % s.
Using System. runtime. interopServices; // reference where to put it .... [DllImport ("dwmapi. dll ")] public static extern int dwmextendframeworkclientarea (IntPtr hWnd, ref MARGINS pMarinset); [StructLayout (LayoutKind. sequential)] public struct
Let's talk about the data type in C #. The value type and reference type.
Value Type: directly store data values and store them in the memory stack.
Reference Type: stores the reference of the Peer value, which actually stores a memory address. the
Some friends consulted the algorithm for analyzing the main color of the image a few days ago. I didn't have any in-depth research on this part. After referring to some small code, I wrote a very simple little tool myself, share it with you.
The
We usually use the formatting data output method provided by the Console class. Is there any other method in C # That can be used? The answer is yes. The formatting method of the String class can also have the same function. The String class
When the child form is displayed in the parent form, add the child form. owner = this; define a parent form object in the child form, and set the parent form object = (parent form type) this in the Load function. owner. Then, use this parent form
There was nothing to worry about, and I wrote an example of converting numbers into RMB capital. The main difficulty is that "0" is in different locations and the processing method is different.
Here, we consider a general number with an integer of
I. Introduction
For some beginners (including those who have been working for several years), the problem of parameter passing between methods is sometimes confusing, because the basic questions for parameter passing are also frequently encountered
Using System;Using System. Collections. Generic;Using System. Linq;Using System. Text;Using System. Threading;Using System. Runtime. Remoting. Messaging;
Namespace asynchronous Delegation{/// /// Indicates that a new thread will be generated during
[Html]
When I made a fast money interface, I encountered a problem that. net RSA encryption could not run normally on a win2008 server. After I changed to Win2003 server, the problem occurred, as shown below:
[Html]"/" Indicates a server error in
. Value Type and reference typeStructure is value type: value type is allocated to the stack. All base types are structure types. For example, int corresponds to System. int32 structure. string corresponds to system. string Structure. You can create
The data transmitted by Webservice can only be serialized data, typically xml data.
// /// return downstream data using the user name and password /// /// User name // / password // [WebMethod] public XmlDataDocument GetUpMassageDate
Purpose: To pass a set of custom parameters to Form1 when you click the button in the subwindow Form2 and display them on the parent window Form1. Method: there are many methods. Here we only introduce how to implement delegation and events. Idea:
1. added the Microsoft. Office. Interop. Excel application.2 reference namespace using Excel = Microsoft. Office. Interop. Excel;/// /// If the supplied excel File does not exist then Create it/// /// Private void CreateExcelFile (string FileName){/
Let me start by saying that the idea I used in this article is not originally mine, but since I have only heard of it and have not been able to find any actual examples of its implementation anywhere I wrote the code to handle it.
With that out of
I recently saw the Console that the instructor talked about in the C # Video. writeLine () only needs to write down cw, and then press the tab key twice. I didn't know it before, And suddenly felt very useful, so I collected some related shortcut
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.