Link to home
Start Free TrialLog in
Avatar of John Kininjjew
John KininjjewFlag for Australia

asked on

System.ArgumentNullException: ''dataType' argument cannot be null.

For some reason this has now become and issue. I am really not sure how as its been working fine.
I am getting a System.ArgumentNullException: ''dataType' argument cannot be null.
Parameter name: dataType'

I have attached a screen shot of this error and code. Help, I cant seem to see the issue here.
System.String-Error.PNG
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Does the error occurs only on the "Serial" string, not on the previous ones?
Was this line modified recently? If yes, are you sure all the characters are 7bit ASCII symbols, not some other languages?
Try to cache the data type objects in the beggining of the BuildItemsTable() method and use the same data type objects on each similar type Add() methods.
Avatar of John Kininjjew

ASKER

The error was the decimal spelling. I really don't know why the debugger stopped on the Serial entry! Weird!
If you followed my second advice, the error would be eliminated by itself. Please consider to make more optimal code.