Blog Stats
  • Posts - 22
  • Articles - 1
  • Comments - 73
  • Trackbacks - 0

 

Convert DataRowCollection to DataRow[] (Array) in C#

Access the select method of the datatable to convert the DataRowCollection to DataRow[];

You might get an error like this:-

System.Data.DataRow.DataRow(System.Data.DataRowBuilder)' is inaccessible due to its protection level

To overcome that use the select method from the datatable

Ex :-

DataRow[] results = genericDataSet.Tables[0].Select(); 


Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © sathya