Datarow Array with foreach question
-
Hi! newbie here just asking which of the following code is more efficient 1. DataRow[] dataRowArray = dtDataTable.Select("TableColumn = 1"); foreach(DataRow drRow in dataRowArray) { ...some processing here } OR 2. foreach(DataRow drRow in dtDataTable.Select("TableColumn = 1")) { ...some processing here } my problem here is do I need to put the result in a datarow array to make it more efficient? or not an issue at all?
-
Hi! newbie here just asking which of the following code is more efficient 1. DataRow[] dataRowArray = dtDataTable.Select("TableColumn = 1"); foreach(DataRow drRow in dataRowArray) { ...some processing here } OR 2. foreach(DataRow drRow in dtDataTable.Select("TableColumn = 1")) { ...some processing here } my problem here is do I need to put the result in a datarow array to make it more efficient? or not an issue at all?