mali

mali

  • NA
  • 60
  • 0

how do i deal with float

Nov 25 2008 6:41 AM

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?


Answers (2)