6. for the string type, if used as an array, use for (I = 0; I <Str. length; I ++) {} format, instead of using the foreach Method
7. Use the foreach method instead of the for Method for other items that can be traversed.
8. For complex string connections, use stringbuilder
9. For Io operations, the buffer must be between 4 K and 8 K.
10. Database Operations
A. Use the optimal managed provider. For example, SQL server uses sqlclient instead of ODBC.
B. You can use datareader without dataset.
C. Use stored procedures whenever possible
D. Use the connection pool of ADO. net. Note that the connectionstirng of the database must be consistent.
E. In connectionstring, close unused parameters whenever possible.
F. Do not set missingschemaaction of dataadapter to missingschemaaction. addwithkey
G. Only the required data is stored in dataset.
H. For multi-row datareader, use commandbehavior. sequentialaccess as much as possible.