KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a text file,which I use to input information into my application.The problem is that some values are float and sometimes they are null,which is why I get an exception. var s = "0.0"; var f = float.Parse(s); The code above throws an exception at line 2 "Input string was not in a correct format." I believe the solution would be the advanced overloads of float.Parse,which include IFormatProvider as a parameter,but I don't know anything about it yet. How do I parse "0.0"?
Tags (comma-separated)
Save Edits
Cancel