Ok here’s what i’m pulling my hair out for;
DidoID = decryptedData2[0].ToString().Split(";"[0]);
I have an array setup like this. What i’ve been trying to do is to specify a length for DidoID and fill in the empty space after the Split happens.
For example the Split() gives me 3 items, i need to add 5 more fields as a string (“empty”) to make its length 8.
Another example would be Split() giving me 6 items and me needing to add 2 fields this time to make it 8.
8 is good. 8 is life
So anyways. Here’s what i’ve tried:
for (var xa: int = 0; xa < 8 - DidoID.Length; xa++){
DidoID.Add("empty");
}
this gives:
NullReferenceException: Object reference not set to an instance of an object
I have some ideas about possible reasons. Maybe tt could be something about Split() creating a different type of array? Or could it be something i miss in the for loop?
Can any of you guys help me?
Thank you in advance…