调用存储过程的方法
调用存储过程
SqlConnection nwindConn = new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;");
SqlCommand salesCMD = new SqlCommand("Sales By Year", nwindConn);
salesCMD.CommandType = CommandType.StoredProcedure;
nwindConn.Open();
SqlCommandBuilder.DeriveParameters(salesCMD);
nwindConn.Close();
readonly跟const的区别
readonly 关键字与 const 关键字不同。const 字段只能在该字段的声明中初始化。readonly 字段可以在声明或构造函数中初始化。因此,根据所使用的构造函数,readonly 字段可能具有不同的值。另外,const 字段是编译时常数,而 readonly 字段可用于运行时常数,如下例所示:
public static readonly uint l1 = (uint) DateTime.Now.Ticks;
XML,XSL,XSD的定义
XSL
可扩展样式表语言
XML
可扩展性标记表语言
XSD
XML模式定义语言(XML Schema Definition)
C#2.0的新特性
模拟范型List和内置算法
委托与匿名委托