Skip to main content

Timeline for How to loop list class

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
Feb 9, 2022 at 7:38 answer added Hans Kesting timeline score: 0
Feb 8, 2022 at 13:05 history edited Faqruddin CC BY-SA 4.0
added 21 characters in body
Feb 8, 2022 at 12:59 history edited Faqruddin CC BY-SA 4.0
added 233 characters in body
Feb 8, 2022 at 12:52 history edited Faqruddin CC BY-SA 4.0
added 796 characters in body
Feb 8, 2022 at 12:06 history edited Faqruddin CC BY-SA 4.0
added 1195 characters in body
Feb 8, 2022 at 11:40 answer added Ajay Gupta timeline score: 1
Feb 8, 2022 at 11:34 comment added Faqruddin @Hans Kesting. yes I need same index for data and invoiceLines in data[i].invoiceLines[i]. How can I get this to return all values. Index currently pointing only one record and return one record. If I change position its return another record. But I need all please.
Feb 8, 2022 at 11:31 comment added Jeroen van Langen @Faqruddin please update your question instead of adding it as comment
Feb 8, 2022 at 11:30 comment added Faqruddin Thank you for your responses. Please find my EInvoiceModel contains below structure, Which i designed as per my json response. public class Class1 { public Invoiceline[] invoiceLines { get; set; } public string parmCustName { get; set; } public DateTime parmInvoiceDate { get; set; } } public class Invoiceline { public string parmItemId { get; set; } public string parmItemNameDisplay { get; set; } public float parmQty { get; set; } }
Feb 8, 2022 at 11:16 comment added Hans Kesting In your loop you are overwriting that invoicelined.parmItemId. You may want to add it to a list. Also, are you sure you need the same index for data and invoiceLines in data[i].invoiceLines[i]?
Feb 8, 2022 at 11:13 comment added J.Salas invoicelined= data[i].invoiceLines; perhaps? is a blind guess, as @PeterSmith said it depends on your class and data structure
Feb 8, 2022 at 11:11 comment added Peter Smith What is your class EInvoiceModel
Feb 8, 2022 at 11:09 history edited Peter Smith CC BY-SA 4.0
added 6 characters in body
S Feb 8, 2022 at 11:07 review First questions
Feb 8, 2022 at 11:42
S Feb 8, 2022 at 11:07 history asked Faqruddin CC BY-SA 4.0