Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
Dave Kreskowiak21-May-21 9:43
mveDave Kreskowiak21-May-21 9:43 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 10:03
michael nabil21-May-21 10:03 
AnswerRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 8:21
mveOriginalGriff21-May-21 8:21 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 8:35
michael nabil21-May-21 8:35 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
Richard Andrew x6421-May-21 9:06
professionalRichard Andrew x6421-May-21 9:06 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 9:13
mveOriginalGriff21-May-21 9:13 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
Gerry Schmitz21-May-21 9:02
mveGerry Schmitz21-May-21 9:02 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 9:29
michael nabil21-May-21 9:29 
public class InvoiceLine
   {
       public string description { get; set; }
       public string itemType { get; set; }
       public string itemCode { get; set; }
       public string internalCode { get; set; }
       public string unitType { get; set; }
       public int quantity { get; set; }
       public UnitValue unitValue { get; set; }
       public int salesTotal { get; set; }
       public double valueDifference { get; set; }
       public double totalTaxableFees { get; set; }
       public Discount discount { get; set; }
       public int netTotal { get; set; }
       public double itemsDiscount { get; set; }
       public IList<TaxableItem> taxableItems { get; set; }
       public int total { get; set; }
   }


I'm sorry i forget to attach the class
i didn't understand your answer "Because you only have one instance of the class and you insert it multiple times into the list. And each time round the loop you overwrite the values you set in the previous instance."
if i have 10 records in grid it means 10 instance to insert one invoice sorry i can't under stand your example about phone and car
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 9:56
mveOriginalGriff21-May-21 9:56 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 10:05
michael nabil21-May-21 10:05 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 10:31
mveOriginalGriff21-May-21 10:31 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 10:55
michael nabil21-May-21 10:55 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 11:38
mveOriginalGriff21-May-21 11:38 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil22-May-21 9:53
michael nabil22-May-21 9:53 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff22-May-21 10:01
mveOriginalGriff22-May-21 10:01 
AnswerRe: Multidimensional Arrays error in fill IList Interface Pin
Eddy Vluggen21-May-21 12:01
professionalEddy Vluggen21-May-21 12:01 
QuestionWhy dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 20:26
Alex Dunlop19-May-21 20:26 
QuestionRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 21:00
mveRichard MacCutchan19-May-21 21:00 
AnswerRe: Why dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 21:04
Alex Dunlop19-May-21 21:04 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 21:38
mveRichard MacCutchan19-May-21 21:38 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 22:08
mveRichard MacCutchan19-May-21 22:08 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 22:46
Alex Dunlop19-May-21 22:46 
GeneralRe: Why dictionary puts data inside [] mark? Pin
jsc4219-May-21 23:58
professionaljsc4219-May-21 23:58 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan20-May-21 0:50
mveRichard MacCutchan20-May-21 0:50 
AnswerRe: Why dictionary puts data inside [] mark? Pin
BillWoodruff30-May-21 21:05
professionalBillWoodruff30-May-21 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.