find是针对DataTable中的primaryKey进行查找Row, 返回的是一个DataRow对象,看一下SDK吧

解决方案 »

  1.   

    private void FindInMultiPKey(DataTable myTable){
        DataRow foundRow;
        // Create an array for the key values to find.
        object[]findTheseVals = new object[3];
        // Set the values of the keys to find.
        findTheseVals[0] = "John";
        findTheseVals[1] = "Smith";
        findTheseVals[2] = "5 Main St.";
        foundRow = myTable.Rows.Find(findTheseVals);
        // Display column 1 of the found row.
        if(foundRow != null)
          Console.WriteLine(foundRow[1]);
     }