Retrieving Value from a DataSet

In the continued spirit of posting whenever I answer a question of mine, here’s a simple snippet of C# code that retrieves a value directly from a dataset.

myVar = myDataSet.Tables[0].Rows[0]["myColumnName"];

Note that the string name can replace the numeric indexes used to more accurately identify a table.

 
   
Leave Your Comment

Name*
Mail*
Website
Comment