Click here to Skip to main content
16,010,334 members
Home / Discussions / C#
   

C#

 
GeneralRe: Password Permission Pin
Dan Neely7-Jun-07 7:31
Dan Neely7-Jun-07 7:31 
GeneralRe: Password Permission Pin
Dave Kreskowiak7-Jun-07 8:21
mveDave Kreskowiak7-Jun-07 8:21 
AnswerRe: Password Permission Pin
Rick van Woudenberg7-Jun-07 5:02
Rick van Woudenberg7-Jun-07 5:02 
AnswerRe: Password Permission Pin
Dan Neely7-Jun-07 7:29
Dan Neely7-Jun-07 7:29 
QuestionDouble seperator disappears upon insert in DB Pin
Rick van Woudenberg7-Jun-07 3:37
Rick van Woudenberg7-Jun-07 3:37 
AnswerRe: Double seperator disappears upon insert in DB Pin
Ian Shlasko7-Jun-07 4:38
Ian Shlasko7-Jun-07 4:38 
GeneralRe: Double seperator disappears upon insert in DB Pin
Rick van Woudenberg7-Jun-07 5:26
Rick van Woudenberg7-Jun-07 5:26 
GeneralRe: Double seperator disappears upon insert in DB Pin
Ian Shlasko7-Jun-07 12:01
Ian Shlasko7-Jun-07 12:01 
Ahhh, ok, I see. Simple problem. Convert.ToDouble is meant to be used to convert from other numeric types, or from a number boxed in an object. It's not a string parser.

What you're looking for is double.TryParse()

Double a;
if (!double.TryParse(textbox.Text, out a))
  throw new ArgumentException("Type a number");


If you check the API for TryParse, you'll see it tries to convert a string to a double, placing the result in the second argument. It returns true if it succeeds, so if it comes back as false, the person typed something non-numeric.

Convert.ToDouble was probably just grabbing every digit character and stuffing them together.
GeneralRe: Double seperator disappears upon insert in DB Pin
Rick van Woudenberg8-Jun-07 13:07
Rick van Woudenberg8-Jun-07 13:07 
Question[Message Deleted] Pin
Ankit Aneja7-Jun-07 3:07
Ankit Aneja7-Jun-07 3:07 
AnswerRe: Filename.indexof Pin
Sathesh Sakthivel7-Jun-07 3:12
Sathesh Sakthivel7-Jun-07 3:12 
AnswerRe: Filename.indexof Pin
Anthony Surendran7-Jun-07 3:20
Anthony Surendran7-Jun-07 3:20 
QuestionCheck Box inside a datagrid in VS2003 Pin
Anthony Surendran7-Jun-07 2:38
Anthony Surendran7-Jun-07 2:38 
AnswerRe: Check Box inside a datagrid in VS2003 Pin
SimulationofSai7-Jun-07 3:26
SimulationofSai7-Jun-07 3:26 
Question.NET C# server and VC++ client Pin
Kabirdas Jaunjare7-Jun-07 2:31
Kabirdas Jaunjare7-Jun-07 2:31 
QuestionHelp with config file error Pin
ttohme7-Jun-07 2:27
ttohme7-Jun-07 2:27 
AnswerRe: Help with config file error Pin
Sathesh Sakthivel7-Jun-07 2:33
Sathesh Sakthivel7-Jun-07 2:33 
GeneralRe: Help with config file error Pin
ttohme7-Jun-07 2:58
ttohme7-Jun-07 2:58 
GeneralRe: Help with config file error Pin
Sathesh Sakthivel7-Jun-07 3:02
Sathesh Sakthivel7-Jun-07 3:02 
GeneralRe: Help with config file error Pin
ttohme7-Jun-07 3:04
ttohme7-Jun-07 3:04 
Questionreport Pin
SVb.net7-Jun-07 2:10
SVb.net7-Jun-07 2:10 
QuestionProblem in retreiving Methods of current class using Reflection Pin
Divya Kasavar7-Jun-07 1:34
Divya Kasavar7-Jun-07 1:34 
AnswerRe: Problem in retreiving Methods of current class using Reflection Pin
Christian Graus7-Jun-07 1:50
protectorChristian Graus7-Jun-07 1:50 
AnswerRe: Problem in retreiving Methods of current class using Reflection Pin
leppie7-Jun-07 2:27
leppie7-Jun-07 2:27 
GeneralRe: Problem in retreiving Methods of current class using Reflection Pin
Brady Kelly7-Jun-07 3:19
Brady Kelly7-Jun-07 3:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.