Wednesday, July 6, 2011

Generic Types In Unity Configuration Section

To use a Unity configuration section with generic types all you have to remember is the
` sign as the sign for a generic type in the configuration file.

  • Code


  • Configuration file

Monday, August 23, 2010

Sql Data Adapter

SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
string query = "SELECT [Name],Age,Gender From Student WHERE ID="+id+"";
cmd.CommandText = query;

DataTable tbl = new DataTable();

SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(tbl);