please review my previous post first...
question: Every time i try to do the following,
Placement placement = (Placement)tableDataIndx[n
if (placement == null)
throw new CannotReadName(name);
for some reason placement always equals 'null' every time i step through the code, and the exception is thrown every time. the Hashtable tableDataIndx seems to properly contain all the string 'names' for key and the Placement 'placement' objects for value as such :
key: DOUG'NUL', value: namespace.DataFileReader+P
key: JEFF'NUL', value: namespace.DataFileReader+P
key: TODD'NUL', value: namespace.DataFileReader+P
The above 'NUL' after the names just means there was a null end character after the string name when the console writes the line out to a file. I realize that Java's and C#'s object-based collections (Maps) return null when an element is not found. But in this case, this seems to work fine: tableDataIndx[name]; but then the cast to Placement: (Placement)tableDataIndx[n
ame]; sets the Placement placement == null
In the Hashtable tableDataIndx
string name are the keys. object class Placement placement are the values which just represent number locations of the data when read from a buffer
?? Please help.