500pts: Creating an array of my class and assigning value gives error
Posted on 2006-11-20
Can anybody tell me why assigning a value to an array of clases i have created would give the following error?
Unhandled exception: Object reference not set to an instance of an object.
Here is my line to initialise the array with 300
Perfil.Preference localPreferences = new Perfil.Preference;
and then assignin this gives the error, the totalFiles at this point is 0 and the id = 11
localPreferences[totalFiles].ID = id;
must be doing something wrong,
Thanks in advance for any info or help