Click here to Skip to main content
15,388,904 members
Home / Discussions / C#
   

C#

 
GeneralRe: Time Elapse Pin
Patrice T16-Mar-16 16:11
mvePatrice T16-Mar-16 16:11 
JokeRe: Time Elapse Pin
Richard Deeming17-Mar-16 2:00
mveRichard Deeming17-Mar-16 2:00 
PraiseRe: Time Elapse Pin
Patrice T17-Mar-16 4:32
mvePatrice T17-Mar-16 4:32 
AnswerRe: Time Elapse Pin
V.16-Mar-16 22:15
professionalV.16-Mar-16 22:15 
QuestionConverting Array To Dictionary Pin
MadDashCoder16-Mar-16 11:16
MemberMadDashCoder16-Mar-16 11:16 
AnswerRe: Converting Array To Dictionary Pin
John Torjo16-Mar-16 11:22
professionalJohn Torjo16-Mar-16 11:22 
GeneralRe: Converting Array To Dictionary Pin
MadDashCoder16-Mar-16 11:32
MemberMadDashCoder16-Mar-16 11:32 
AnswerRe: Converting Array To Dictionary Pin
Matt T Heffron16-Mar-16 11:47
professionalMatt T Heffron16-Mar-16 11:47 
The most obvious solution would be to use List<Product> instead of Product[], and then use Products.Add(...); to populate the collection.
C#
List<Product> products = new List<Product>;

products.Add(p1);
products.Add(p2);
products.Add(p3);

"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton

AnswerRe: Converting Array To Dictionary Pin
Mathi Mani16-Mar-16 11:47
MemberMathi Mani16-Mar-16 11:47 
GeneralRe: Converting Array To Dictionary Pin
MadDashCoder16-Mar-16 12:04
MemberMadDashCoder16-Mar-16 12:04 
SuggestionRe: Converting Array To Dictionary Pin
Sascha Lefèvre16-Mar-16 11:56
professionalSascha Lefèvre16-Mar-16 11:56 
SuggestionRe: Converting Array To Dictionary Pin
Richard Deeming17-Mar-16 1:58
mveRichard Deeming17-Mar-16 1:58 
AnswerRe: Converting Array To Dictionary Pin
Luc Pattyn17-Mar-16 7:41
sitebuilderLuc Pattyn17-Mar-16 7:41 
AnswerRe: Field Naming Pin
OriginalGriff16-Mar-16 5:55
mveOriginalGriff16-Mar-16 5:55 
GeneralRe: Field Naming Pin
Pete O'Hanlon16-Mar-16 6:36
mvaPete O'Hanlon16-Mar-16 6:36 
GeneralRe: Field Naming Pin
OriginalGriff16-Mar-16 6:41
mveOriginalGriff16-Mar-16 6:41 
GeneralRe: Field Naming Pin
jsc4217-Mar-16 23:06
professionaljsc4217-Mar-16 23:06 
GeneralRe: Field Naming Pin
OriginalGriff16-Mar-16 6:47
mveOriginalGriff16-Mar-16 6:47 
AnswerRe: Field Naming Pin
Gerry Schmitz16-Mar-16 6:45
mveGerry Schmitz16-Mar-16 6:45 
GeneralRe: Field Naming Pin
Gerry Schmitz16-Mar-16 9:08
mveGerry Schmitz16-Mar-16 9:08 
AnswerRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 7:49
professionalSascha Lefèvre16-Mar-16 7:49 
GeneralRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 8:44
professionalSascha Lefèvre16-Mar-16 8:44 
GeneralRe: Field Naming Pin
Sascha Lefèvre16-Mar-16 8:54
professionalSascha Lefèvre16-Mar-16 8:54 
GeneralRe: Field Naming Pin
OriginalGriff16-Mar-16 9:15
mveOriginalGriff16-Mar-16 9:15 
QuestionLooking for a .Net Named-Lock-Manager Pin
Sascha Lefèvre16-Mar-16 2:43
professionalSascha Lefèvre16-Mar-16 2:43 

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.