Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quantity = 1;
- product_type = Book;
- price = 12.00;
- <Books>
- <Book>
- <Quantity>1</Quantity>
- <Price>12</Price>
- </Book>
- </Books>
- string str = "1 Book price $12.00";
- string[] strArray = str.split(' ');
- quantity = Convert.toInt32(strArray[0]);
- product_type = strArray[1] ;
- price = Convert.toDecimal(strArray[2].replace("$","") );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement