0
newDt.importRow(dt.dataSource[i]);

when I call above I want to reach the object's itself in the block below. I mean I want to reach to countnumber of newDt object with getCount() methods. I tried this using with this keyword but it did not run. how do I do this?

public void importRow(Object[] row){
    int newCount = this.getCount()+1;
    Object[][] newDataSource = new Object[getCount()+1][getColumns().length];
    for (int i = 0; i < newDataSource.length; i++) {
        for (int j = 0; j < getColumns().length; j++) {
            newDataSource[i][j] = this.getValueByColumnIndex(i, j);
        }
    }
    for (int i = 0; i < getColumns().length; i++) {
        newDataSource[newCount][i] = row[i];
    }
}
Mustafa Güven
  • 15,526
  • 11
  • 63
  • 83
  • It's really not clear what you mean by either "the object's itself" or "countnumber of newDt object". Could you clarify? – Jon Skeet Oct 15 '11 at 09:55
  • I want to get record count of newDt object in importRow block. It's a class which is made by me. – Mustafa Güven Oct 15 '11 at 12:05
  • Your code does what you want to do. You should define "it did not run". Any exception? What's the stack trace? Does it compile? What does it do and what would you want it to do? – JB Nizet Oct 15 '11 at 13:54
  • We can't understand what you are asking. (And repeating what you wrote in your question is not helping us.) Please add the actual error message to your question. – Stephen C Oct 15 '11 at 13:57
  • newDt is a DataTable (which I made for android) and DataTable class has importRow method. When I call importRow it must add that row to the caller DataTable just like in c#. But it does not. Did i make myself clear enough? – Mustafa Güven Oct 15 '11 at 15:16

0 Answers0