I take information from the database, when I get fields, I get a lotdreader["field_name"].ToString()
Is it possible to translate DataReader into Dictionary right away to get rid of the ToString () heap ?:drDict["field_name"]
UPD:
did so:Dictionary<string, object> drDict; drDict = Enumerable.Range(0, dr.FieldCount).ToDictionary(dr.GetName, dr.GetValue);
but the value is object, again you need to cast it in string
dr.GetValue.ToString()
- tym32167 hereToDictionary(dr.GetName, (string)dr.GetValue)
also an error - axmed2004.ToString()
- tym32167