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

C#

 
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 
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 
Right. Obviously!

So you understand that "car" is a generic word, but that each vehicle that is a "car" is separate and distinct. "My car" is not the same as "your car" - it shares some generic characteristics such as the number of wheels, and that it has an engine (or engines) but most of it's attributes are specific to a particular vehicle.

In computing, we call "car" a class and a specific vehicle an instance of that class, with the properties of an instance being defined by the class but "filled in" by the instance:
C#
class Car
   {
   Color Color {get; set;}
   Manufacturer Manunfacturer {get; set;}
   }
...
Car myCar = new Car() { Color = Colors.Black, Manufacturer = Manufacturers.Mercedes};
Car yourCar = new Car() { Color = Colors.Red, Manufacturer = Manufacturers.Ford};


If you respray yourCar blue, it doesn't affect the colour of myCar - you know that!

So if your code creates just one instance of an InvoiceLine, what happens if you set the properties over and over again?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

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 
QuestionGet folders like the one for mega, drop box Pin
Duc Axenn19-May-21 11:35
Duc Axenn19-May-21 11:35 
AnswerRe: Get folders like the one for mega, drop box Pin
Dave Kreskowiak19-May-21 11:58
mveDave Kreskowiak19-May-21 11:58 
GeneralRe: Get folders like the one for mega, drop box Pin
Duc Axenn19-May-21 13:45
Duc Axenn19-May-21 13:45 

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.