SyntaxFix
Write A Post
Hire A Developer
Questions
You can also do this.
//find the index of the CompanyName column int columnIndex = thisReader.GetOrdinal("CompanyName"); //Get the value of the column. Will throw if the value is null. string companyName = thisReader.GetString(columnIndex);