DataReader - hardcode ordinals?

前端 未结 6 2065
执念已碎
执念已碎 2021-01-11 10:29

When returning data from a DataReader I would typically use the ordinal reference on the DataReader to grab the relevant column:

if         


        
6条回答
  •  情书的邮戳
    2021-01-11 11:01

    I always go with the string name approach just because reading the code is cleaner. Having to mentally parse index to column name is horrible.

提交回复
热议问题