5、方法GetType()获取当前实例的Type。SqlParameter对象的应用string sql = "update Table1 set name = 'Pudding' where ID = '1'";//未采用SqlParameterSqlConnection conn = new SqlConnection();conn.ConnectionString = "server=.;database=studentmanagement;uid=admin;pwd=admin123";//连接字符串与数据库有关SqlCommand cmd = new Sq
7、arameter sp = new SqlParameter("@name", "Pudding");cmd.Parameters.Add(sp);sp = new SqlParameter("@ID", "1");cmd.Parameters.Add(sp);该方法每次只能添加一个SqlParameter。上述代码的功能是将ID值等于1的字段name更新为Pudding(人名)。SqlParameter对象的应用二、AddRange方法SqlParameter[] paras = new SqlParameter[] { new SqlParameter("@