Bloggers will go to Java development next month, after the C # touch less, usually some experience in OneNote, and now collected and sorted out:
C # Article:
1, the choice of target platform
The "target platform" is x86 for setting the project properties as required when compiling VS programs in the system . If set to AnyCPU, there is no "edit and Continue" in VS 2005.
--both x86 and anycpu can be used on 32-bit operating systems.
--Selecting x86 to run on a 64-bit server may cause problems with the class library not loading. This issue is explained in the following IIS experience.
2, take the DataTable or DataGridView inside the value of two common methods:
Dt. Rows[i]. cells["ID"]. Value.tostring ();d T. rows[0["Name"]. ToString ();
The former needs to be taken from value , which is not very convenient to use. the latter and cannot add Value.
--All the brackets can use the ordinal (starting from 0) or the field name (column name, row name)
3. If you do not use LINQ (the 2.0 framework that is used all the time ...). ), you can use this method to write execution SQL. such as:
string string. Format ("Insert table_1 values (' {0} ', ' {1} ', {2},{3})"
If it is a varchar type, it must be used, if it is an int, it is found that both can be used ' or not used, often write scripts, too troublesome, all with the ' ', seemingly implementation of the problem, but do not know that performance will be reduced. If you know a friend, please say it in the comment section.
4,DLL Reference, but in the code is still unable to call.
Try to set the property inside the DLL to use a specific version of False.
SQL Article
1. Questions about join in SQL.
When the left join table (child table), on the field exists two, then the results of the query will be divided into two.
Example:
(1) The contents of two tables are
(2) Results of the LEFT join
2, the same table can be left join two times
3.Union, if the two field types are different, you must convert them, or you will get an error.
such as convert. Note Using UNION ALL can significantly increase the speed so that the query results are not sorted.
Ideas and Design concepts:1. The concept of logical deletion and physical deletion?
The physical deletion is actually deleted, and the tombstone retains the location of the data in the database, but modifies its delete flag as deleted (it looks like this is learning in college ...). )
2, in the UI layer, if something goes wrong, or the operation fails, you should remind the user what to do next.
For example: When the user takes action B, the option A must be turned on. Set the current option A to off, and the user to action B, you should be prompted: "The operation failed, option A is not enabled, please turn on option A in the XXX settings." In some applications, you can even increase the direct jump to settings, or modify the settings directly. It depends on the need.
Some useful development experience, memorial to my C # development process