Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
GeneralRe: ArrayList in ArrayList Pin
maibuihuynhtg18-Nov-04 16:43
maibuihuynhtg18-Nov-04 16:43 
GeneralOverriding soap interpretation of specific types Pin
WildRide18-Nov-04 13:32
WildRide18-Nov-04 13:32 
GeneralRe: Overriding soap interpretation of specific types Pin
steve_hocking19-Nov-04 3:23
steve_hocking19-Nov-04 3:23 
QuestionHow can i get the ID3 info on MP3s Pin
visiontec18-Nov-04 13:30
visiontec18-Nov-04 13:30 
AnswerRe: How can i get the ID3 info on MP3s Pin
Leon van Wyk18-Nov-04 22:07
professionalLeon van Wyk18-Nov-04 22:07 
GeneralOverriding Object.Equals; Overriding Object.GetHashCode Pin
McClamm18-Nov-04 12:07
McClamm18-Nov-04 12:07 
GeneralRe: Overriding Object.Equals; Overriding Object.GetHashCode Pin
Daniel Turini18-Nov-04 20:45
Daniel Turini18-Nov-04 20:45 
GeneralDeclaring arrays of class objects Pin
Steve Searcy18-Nov-04 9:20
Steve Searcy18-Nov-04 9:20 
I am a new programmer in C#, so I hope there is an easy answer for this problem.

I need to declare an array of class objects, and the code compiles fine, but I always get the runtime exception "Object reference not set to an instance of an object." When I single step through the code, the exception is thrown when the array declaration statement is executed. I have tried the same declaration, but for a single instance rather than an array, and it works fine. I can step through the constructor and see that all the variable are created properly.

Below are the two statements that I have used. I try the array declaration, and it bombs. The single instance works great. Any suggestions on what I am doing wrong? I can provide more details if needed.

Parameter[] yearsArray = new Parameter[yearsOfData];
Parameter yearArray = new Parameter();


Steve

GeneralRe: Declaring arrays of class objects Pin
Daniel Turini18-Nov-04 10:05
Daniel Turini18-Nov-04 10:05 
GeneralDataGrid Header in Windows Application Pin
Hamada_star18-Nov-04 6:28
Hamada_star18-Nov-04 6:28 
GeneralC# Datagrid Separate Column Header Font Colors Pin
StyleGuide18-Nov-04 5:13
StyleGuide18-Nov-04 5:13 
QuestionHow to create automatic updates ? Pin
Inquire2you18-Nov-04 4:14
Inquire2you18-Nov-04 4:14 
AnswerRe: How to create automatic updates ? Pin
Ami Bar18-Nov-04 9:19
Ami Bar18-Nov-04 9:19 
Generalcombobox.selectedvalue Pin
webhay18-Nov-04 3:16
webhay18-Nov-04 3:16 
GeneralString Contains String Pin
MrEyes18-Nov-04 3:01
MrEyes18-Nov-04 3:01 
GeneralRe: String Contains String Pin
MrEyes18-Nov-04 3:10
MrEyes18-Nov-04 3:10 
Generaleasy: string formatting Pin
bouli18-Nov-04 1:17
bouli18-Nov-04 1:17 
GeneralRe: easy: string formatting Pin
Ami Bar18-Nov-04 4:11
Ami Bar18-Nov-04 4:11 
GeneralRe: easy: string formatting Pin
bouli18-Nov-04 4:15
bouli18-Nov-04 4:15 
GeneralRe: easy: string formatting Pin
Dave Kreskowiak18-Nov-04 6:33
mveDave Kreskowiak18-Nov-04 6:33 
GeneralRe: easy: string formatting Pin
bouli18-Nov-04 9:06
bouli18-Nov-04 9:06 
GeneralRe: easy: string formatting Pin
Dave Kreskowiak18-Nov-04 9:46
mveDave Kreskowiak18-Nov-04 9:46 
GeneralRe: easy: string formatting Pin
Nick Parker18-Nov-04 11:40
protectorNick Parker18-Nov-04 11:40 
GeneralProblem with Event and Timer Pin
Leon van Wyk18-Nov-04 1:04
professionalLeon van Wyk18-Nov-04 1:04 
GeneralRe: Problem with Event and Timer Pin
Daniel Turini18-Nov-04 1:26
Daniel Turini18-Nov-04 1:26 

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.