SqlCommand对象的字符串SQL命令可以做多个,以查询为例,用到SqlDataReader的一些方法,如ExecuteReader(),Read()(一条命令内的移动至下一记录),NextResult()(移动到下一个命令并执行). using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.SqlClient; using System.Da
1.TreeView选择事件执行两次 Very often, we need to execute some code in SelectedItemChanged depending on the selected TreeViewItem. ButSelectedItemChanged is called twice. This is due to stealing focus from the main window, which is screwing something up. Wha