vb.net - Is it possible to convert DataRow to arraylist? -
i have datarow. there way convert arraylist? need convert arraylist because want pass function compares 2 arrays , returns false if not same.
foo(datarow, arraylist) public function foo(byval arr1 arraylist, byval arr2 arraylist) boolean compare , return false if not same end function
so, how convert datarow arraylist can pass function.
i agree should convert arraylist if necessary, can.
dim al new arraylist dim dt new datatable dt.columns.add("f") dt.columns.add("n") dim dr datarow dr = dt.newrow dr.item(0) = "first" dr.item(1) = "name" dt.rows.add(dr) each row datarow in dt.rows each column datacolumn in dt.columns al.add(row.item(column.columnname)) next messagebox.show(al.item(0).tostring & " " & al.item(1).tostring) next
Comments
Post a Comment