TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anna Hawks
NA
193
0
How's this Double.Parse statement work?!
May 13 2008 3:19 PM
I'm updating an old program (written in VS2003 and updating in VS2005) and found the following statement:
sql.Parameters.AddWithValue("@acheck", Double.Parse(txtAmtCheck.Text == "" ? "0.0" : txtAmtCheck.Text));
I'm assuming the intention was to substitute a zero if the textbox was blank -- based on the fact that I get the error that it can't enter a null into that field -- but it doesn't
work now. I know I can say, "If tb == ""....", but I was just curious if anyone had seen anything like this before?
Reply
Answers (
3
)
How to create connection for mysql database
C# structure