[Solved] c# dataRow access throw a System.ArgumentException


I found answer on my question. This happens when you merge typed dataset to another dataset and target dataset does not contais typed table.
for example:

var sourceDataSet = new SomeTypedDataset();
var strongTypedTable = new SomeTypedDataTable()
sourceDataSet.Tables.Add(strongTypedTable );
var targetDataSet = new SomeTypedDataset();
targetDataSet.Merge(sourceDataSet);// at that step targetDataSet will contains strongTypedTable byt this DataTable is not strong-typed

if you need save ability to work with strong-typed datatable in targetDataSet you need add to the targetDataSet empty typed dataTable and after that call merge

var targetDataSet = new SomeTypedDataset();
targetDataSet.Tables.Add(new SomeTypedDataTable());
targetDataSet.Merge(sourceDataSet);

solved c# dataRow access throw a System.ArgumentException