this is my code:
found_product[i] = new Product((int)(dr["productNum"]), (string)(dr["catalogNum"]), (string)(dr["item_Description"]), (string)(dr["productDescription"]), (int)(dr["productAmount"]),(string)(dr["supplier_name"]), (string)(dr["date"]).ToString(), (float)(dr["buyingPrice"]));
I have a problem with the "(float)(dr["buyingPrice"])" it's give me an error "Specified cast is not valid."
what can I do?