Dim s As String = "primaryKeyValue"
Dim foundRow As DataRow = DataSet1.Tables("AnyTable").Rows.Find(s)
If foundRow IsNot Nothing Then
MsgBox(foundRow(1).ToString())
Else
MsgBox("A row with the primary key of " & s & " could not be found")
End If
string s = "primaryKeyValue";
DataRow foundRow = dataSet1.Tables["AnyTable"].Rows.Find(s);
if (foundRow != null)
{
MessageBox.Show(foundRow[1].ToString());
}
else
{
MessageBox.Show("A row with the primary key of " + s + " could not be found");
}
String s = "primaryKeyValue";
DataRow foundRow = dataSet1.get_Tables().get_Item("AnyTable").get_Rows().Find(s);
if (foundRow != null)
{
MessageBox.Show(foundRow.get_Item(1).toString());
}
else
{
MessageBox.Show("A row with he primary key of " + s + " could not be found.");
}