Answer:
SqlDataReader'FieldCount property is used for getting no of columns in current row.
It returns no of columns as integer value means it counts columns.
int no_of_columns = dr.FieldCount;
where dr is our SqlDataReader object.
Asked In: Many Interviews |
Alert Moderator