• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 56
  • Last Modified:

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
0
John Kininjjew
Asked:
John Kininjjew
  • 2
1 Solution
 
Bill PrewCommented:
The line you highlighted looks okay, but I did notice a typo a little further on, try correcting that (and checking for any other such typos).

sshot-467.png

»bp
0
 
zc2Commented:
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.
0
 
John KininjjewDirector of DevelopmentAuthor Commented:
The error was the decimal spelling. I really don't know why the debugger stopped on the Serial entry! Weird!
0
 
zc2Commented:
If you followed my second advice, the error would be eliminated by itself. Please consider to make more optimal code.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now