When we create a new Windows Form, the backend code automatically adds the following code:
1 public partial class Form1:form2 {3 Public Form1 ()4 {5 InitializeComponent ();6}7}
Why is the class Form1 to be modified with partial? Where is the partial
1. What is a local type?
C # 2.0 introduces the concept of a local type. Local types allow us to divide a class, struct, or interface into several parts, implemented in several different. cs files, respectively.
Local types are suitable for the
Definition of builder Mode:
Separates the construction of a complex object from its representation so that the same build process can create different representations, such that the design pattern is called the builder pattern
Builder mode
Both need to introduce namespaces: using System.Drawing;
First, the picture watermark
Front desk photoshuiyin.aspx Code:
Background Photoshuiyin.aspx.cs Code:
protected void Page_Load (object sender, EventArgs e) {Button1.Click + = button1_click;
Speaking of observer patterns, it is estimated that a heap can be found in the garden. So the purpose of writing this blog is two points:
1. The observer pattern is the necessary mode of writing loose coupling code, the importance is self-evident,
One, the reason for using threads
1. You can use threads to isolate code from other code to improve application reliability.
2. You can use threads to simplify coding.
3. Threads can be used to implement concurrent execution.
II. Basic Knowledge
1,
Recently contacted Mvcpager to make a note.
In fact, I like the front and back end of the separation, paging this thing is responsible for the end of the place, the back end without consultants, here Mvcpager a bit reminds me of the server control,
First we need to know if the program has a memory leak, and then locate exactly which line of code has a memory leak so that it can be repaired.
The simplest way of course is to rely on professional detection tools, more famous such as Boundscheck,
Autofac and autofac Chinese documents
By the end of the year, the project has been relatively leisurely recently. I would like to summarize some of the technologies and usage methods used in the project.
I have previously written an extension for
Dapper learning, dapper
In the previous article, we introduced the Create method of Rainbow. Here we will introduce the Update method. After all, it is the dual-cell brother to add and modify the method.
I. Update
1. Test code:
var conStr =
Dapper learning, dapper
We have already introduced the addition, modification, and deletion. Next we will introduce the Read method of Rainbow.
I. Read -- native Rainbow
1. Check the test code first.
Var conStr = ConfigurationManager.
[CLR via C #] CSC compiles the source code into a hosting module,
Demonstrate the process of compiling source code files ., Source code files can be created in any language that supports CLR. Then, use a corresponding compiler to check the syntax
The parameter type is params. The parameter is params.
Params parameter exercises
1 namespace Test 2 {3 class Program 4 {5 static void Main (string [] args) 6 {7 // params constructor declaration array, variable array length 8 UseParam1 (, 2, 3); 9
C # -- this keyword (2) (including help stickers ),
This time, let's take a look at the second usage of the this keyword:Passing objects as parameters to other methods
----------------------------------------------------------------------------------
C # EXCEL import and export,
1: EXCEL export is very simple. Upload the EXCEL template to the project, save the browsing URL (excelUrl), and then:
Window. location. href = "http: // localhost: 10086/yuanxin/Resources/BusRoute.xlsx" // EXCEL browsing
Conversion between Object and Json in C,
// Create a class, which has two methods
Using Newtonsoft. Json;Namespace System{Public static class JsonExtension{/// /// Convert the object to a JSON string/// /// Object /// JSON string Public static
The open-source Iot framework ServerSuperIO 3.0 was officially released (C #). cross-platform: Win & Win10 Iot & Ubuntu Mate, a set of device drivers mounted across platforms, attached: Development kits and tutorials .,
Major updates of version 3.0:
[Reprint] C # Use Interlocked for atomic operations,
Source article: Wang Xu blog» C # Use Interlocked for atomic operations
What is an atomic operation?
Atom is intended to be "the smallest particle that cannot be further divided", while atomic
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