I have a string like
String OrderText = @"1 MI-SCBSMT24SM 10 45.62 1 PC 456.20 2020.03.18
MI-SCBSMT24SM,, MI-SCBSMT24SM
2 MI-SCBSML24SM 10 32.28 1 PC 322.80 2020.03.18
MI-SCBSML24SM,, MI-SCBSML24SM"
Here one order is 1 MI-SCBSMT24SM 10 45.62 1 PC 456.20 2020.03.18 MI-SCBSMT24SM,, MI-SCBSMT24SM
And second order is 2 MI-SCBSML24SM 10 32.28 1 PC 322.80 2020.03.18 MI-SCBSML24SM,, MI-SCBSML24SM
How can i split it.
my output will be like
orderRow.ArticleCode = OrderItem[1]; // MI-SCBSMT24SM
orderRow.Quantity = Convert.ToInt32(OrderItem[2]); // 10
orderRow.Price = OrderItem[3]; // 45.62
orderRow.Amount = OrderItem[6]; // 456.20
orderRow.DeliveryDate = OrderItem[7].Replace(".", "-"); // 2020.03.18
and for second orderrow
orderRow.ArticleCode = OrderItem[1]; // MI-SCBSML24SM
orderRow.Quantity = Convert.ToInt32(OrderItem[2]); // 10
orderRow.Price = OrderItem[3]; // 32.28
orderRow.Amount = OrderItem[6]; // 322.80
orderRow.DeliveryDate = OrderItem[7].Replace(".", "-"); // 2020.03.18