c# - FormatException was unhandled Input string was not in a correct format -
i want int value database. have error formatexception unhandled input string not in correct format.
my code
string str = doc_cell.text; ulong = convert.touint64(str);
the problem comes because string convert not uint64, because of line throws exception.
you should write this:
uint64 =0; bool issuccess = uint64.tryparse(str, out a); in case have value of string in a, if parsing successful. if parsing not have 0 in a.
Comments
Post a Comment