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

C#

 
QuestionInsert data from feed to sql table Pin
Alexmarvel28-Jan-15 0:25
Alexmarvel28-Jan-15 0:25 
AnswerRe: Insert data from feed to sql table Pin
OriginalGriff28-Jan-15 0:38
mveOriginalGriff28-Jan-15 0:38 
AnswerRe: Insert data from feed to sql table Pin
ZurdoDev28-Jan-15 3:45
professionalZurdoDev28-Jan-15 3:45 
QuestionHelp in converting this C# console into C# winform Pin
Member 1032105927-Jan-15 22:01
Member 1032105927-Jan-15 22:01 
AnswerRe: Help in converting this C# console into C# winform Pin
OriginalGriff27-Jan-15 22:46
mveOriginalGriff27-Jan-15 22:46 
QuestionAdding arraylist elements but some must be -1 Pin
Mac20nine26-Jan-15 13:54
Mac20nine26-Jan-15 13:54 
AnswerRe: Adding arraylist elements but some must be -1 Pin
Pete O'Hanlon26-Jan-15 20:12
mvePete O'Hanlon26-Jan-15 20:12 
AnswerRe: Adding arraylist elements but some must be -1 Pin
OriginalGriff26-Jan-15 20:14
mveOriginalGriff26-Jan-15 20:14 
Your teacher is an idiot. Arraylists are seriously out of date, simply because you can mix types, which means they give runtime errors instead of compile time. That means that it is more likely that a problem will get through to production than using a List<T> which insists on strong typing and doesn't need you to cast the variables.

But in this case, I'd use an array of decimal values instead of a List or ArrayList: unless you are adding items dynamically (at run time) and don't know the number of items in advance.

The error is probably because you are using "magic numbers" - the hard-coded "2" in your code - instead of using a loop to get the values.

Go back a step, and think how you would use a loop to access an array - I'm sure that your teacher has covered that - and then look at the whole of your code (not just the one line you show) and try using that method on your list.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

AnswerRe: Adding arraylist elements but some must be -1 Pin
V.27-Jan-15 0:16
professionalV.27-Jan-15 0:16 
QuestionDo you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
shiv Mohan26-Jan-15 9:33
shiv Mohan26-Jan-15 9:33 
AnswerRe: Do you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
ZurdoDev26-Jan-15 10:10
professionalZurdoDev26-Jan-15 10:10 
GeneralRe: Do you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
John C Rayan26-Jan-15 10:33
professionalJohn C Rayan26-Jan-15 10:33 
AnswerRe: Do you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
Mycroft Holmes26-Jan-15 11:45
professionalMycroft Holmes26-Jan-15 11:45 
AnswerRe: Do you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
Eddy Vluggen27-Jan-15 7:26
professionalEddy Vluggen27-Jan-15 7:26 
GeneralRe: Do you prefer using Microsoft Enterprise Data Block over EF 6.0 Pin
Mycroft Holmes27-Jan-15 13:41
professionalMycroft Holmes27-Jan-15 13:41 
QuestionThe form appeared in debug mode even though I deleted it. Pin
WrightSfiso25-Jan-15 22:36
WrightSfiso25-Jan-15 22:36 
AnswerRe: The form appeared in debug mode even though I deleted it. Pin
OriginalGriff25-Jan-15 22:45
mveOriginalGriff25-Jan-15 22:45 
GeneralRe: The form appeared in debug mode even though I deleted it. Pin
WrightSfiso25-Jan-15 22:49
WrightSfiso25-Jan-15 22:49 
GeneralRe: The form appeared in debug mode even though I deleted it. Pin
OriginalGriff25-Jan-15 22:57
mveOriginalGriff25-Jan-15 22:57 
GeneralRe: The form appeared in debug mode even though I deleted it. Pin
WrightSfiso26-Jan-15 2:34
WrightSfiso26-Jan-15 2:34 
GeneralRe: The form appeared in debug mode even though I deleted it. Pin
OriginalGriff26-Jan-15 3:55
mveOriginalGriff26-Jan-15 3:55 
QuestionCustom properties OpenXml C# Pin
Member 1139687825-Jan-15 19:57
Member 1139687825-Jan-15 19:57 
AnswerRe: Custom properties OpenXml C# Pin
Richard Deeming26-Jan-15 2:19
mveRichard Deeming26-Jan-15 2:19 
Questioncrystal report problem Pin
shuaibwasifkhan25-Jan-15 10:31
shuaibwasifkhan25-Jan-15 10:31 
AnswerRe: crystal report problem Pin
Mycroft Holmes25-Jan-15 21:54
professionalMycroft Holmes25-Jan-15 21:54 

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.