public void FindRowsInconsistentKeyLength()
{
Assert.Throws<ArgumentException>(() =>
{
DataTable dt = new DataTable("table");
dt.Columns.Add("col1");
dt.Columns.Add("col2");
dt.Columns.Add("col3");
dt.Rows.Add(new object[] { 1, 2, 3 });
dt.Rows.Add(new object[] { 4, 5, 6 });
dt.Rows.Add(new object[] { 4, 7, 8 });
dt.Rows.Add(new object[] { 5, 7, 8 });
dt.Rows.Add(new object[] { 4, 8, 9 });
DataView dv = new DataView(dt, null, "col1",
DataViewRowState.CurrentRows);
dv.FindRows(new object[] { 1, 2, 3 });
});
}