Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
AnswerRe: Validation IsNumeric in C# Pin
Dave Doknjas8-Jun-06 16:32
Dave Doknjas8-Jun-06 16:32 
A couple of notes about the other replies:
1. You don't want to be catching exceptions as part of the normal logic flow. This is a well-accepted standard in software development.
2. You don't want to do this in a KeyPress event since that won't handle pasting code from another source.

For a more robust equivalent to VB's IsNumeric method see: http://www.tangiblesoftwaresolutions.com/Articles/CSharp%20Equivalent%20to%20IsNumeric.htm[^]

David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter
Instant C++: VB to C++ converter
Clear VB: Cleans up VB.NET code
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan8-Jun-06 20:13
professionalMairaaj Khan8-Jun-06 20:13 
GeneralRe: Validation IsNumeric in C# Pin
Dave Doknjas9-Jun-06 4:05
Dave Doknjas9-Jun-06 4:05 
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan9-Jun-06 20:20
professionalMairaaj Khan9-Jun-06 20:20 
AnswerRe: Validation IsNumeric in C# [modified] Pin
Suamal9-Jun-06 1:05
Suamal9-Jun-06 1:05 
GeneralRe: Validation IsNumeric in C# Pin
Mairaaj Khan9-Jun-06 21:35
professionalMairaaj Khan9-Jun-06 21:35 
GeneralRe: Validation IsNumeric in C# Regualr Expression Pin
Mairaaj Khan10-Jun-06 0:15
professionalMairaaj Khan10-Jun-06 0:15 
Questionback-up Windows service for database backup. Pin
aakar7-Jun-06 16:25
aakar7-Jun-06 16:25 
AnswerRe: back-up Windows service for database backup. Pin
dreynglar8-Jun-06 6:37
dreynglar8-Jun-06 6:37 
QuestionForm height increases on Show() Pin
cmaissan7-Jun-06 15:04
cmaissan7-Jun-06 15:04 
AnswerRe: Form height increases on Show() Pin
Edbert P7-Jun-06 16:27
Edbert P7-Jun-06 16:27 
GeneralRe: Form height increases on Show() Pin
Jun Du7-Jun-06 16:42
Jun Du7-Jun-06 16:42 
GeneralRe: Form height increases on Show() Pin
cmaissan8-Jun-06 1:32
cmaissan8-Jun-06 1:32 
QuestionControls and Properties Pin
TheBlindWatchmaker7-Jun-06 14:06
TheBlindWatchmaker7-Jun-06 14:06 
AnswerRe: Controls and Properties Pin
Edbert P7-Jun-06 14:53
Edbert P7-Jun-06 14:53 
GeneralRe: Controls and Properties Pin
TheBlindWatchmaker7-Jun-06 18:03
TheBlindWatchmaker7-Jun-06 18:03 
GeneralRe: Controls and Properties Pin
Edbert P7-Jun-06 21:01
Edbert P7-Jun-06 21:01 
QuestionXML Viewer planning Pin
eggie57-Jun-06 13:22
eggie57-Jun-06 13:22 
QuestionVS 2005 Query Builder Parameter? Pin
PyroManiak7-Jun-06 12:56
PyroManiak7-Jun-06 12:56 
AnswerRe: VS 2005 Query Builder Parameter? Pin
PyroManiak8-Jun-06 7:45
PyroManiak8-Jun-06 7:45 
QuestionClickonce help Pin
cechode7-Jun-06 12:48
cechode7-Jun-06 12:48 
AnswerRe: Clickonce help Pin
PyroManiak8-Jun-06 7:49
PyroManiak8-Jun-06 7:49 
QuestionVS2005 Warning Error Message Pin
donkaiser7-Jun-06 12:06
donkaiser7-Jun-06 12:06 
AnswerRe: VS2005 Warning Error Message Pin
Office Lineman7-Jun-06 14:04
Office Lineman7-Jun-06 14:04 
GeneralRe: VS2005 Warning Error Message Pin
donkaiser8-Jun-06 2:57
donkaiser8-Jun-06 2:57 

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.