Click here to Skip to main content
16,016,184 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:37
Paresh Gheewala5-Feb-03 11:37 
GeneralRe: How to tell whether a string is a number? Pin
clarkwuzhe5-Feb-03 11:39
clarkwuzhe5-Feb-03 11:39 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:42
Paresh Gheewala5-Feb-03 11:42 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:45
Paresh Gheewala5-Feb-03 11:45 
GeneralRe: How to tell whether a string is a number? Pin
clarkwuzhe5-Feb-03 11:46
clarkwuzhe5-Feb-03 11:46 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:51
Paresh Gheewala5-Feb-03 11:51 
AnswerRe: How to tell whether a string is a number? Pin
Vasudevan Deepak Kumar5-Feb-03 17:53
Vasudevan Deepak Kumar5-Feb-03 17:53 
AnswerRe: How to tell whether a string is a number? Pin
Ian Darling5-Feb-03 23:04
Ian Darling5-Feb-03 23:04 
If this was VB.NET, you could use IsNumeric, so you could wrap that up in a class that is callable from C#.

Another C# approach would probably be to check each character in the string with IsDigit or IsNumber, or maybe use something similar to the following.

string s="1234";<br />
bool b = s.Trim("1234567890".ToCharArray()).Equals("");


--
Ian Darling
AnswerRe: How to tell whether a string is a number? Pin
Richard Deeming6-Feb-03 0:33
mveRichard Deeming6-Feb-03 0:33 
GeneralRe: How to tell whether a string is a number? Pin
Vasudevan Deepak Kumar6-Feb-03 2:22
Vasudevan Deepak Kumar6-Feb-03 2:22 
GeneralRe: How to tell whether a string is a number? Pin
Richard Deeming6-Feb-03 2:33
mveRichard Deeming6-Feb-03 2:33 
GeneralRe: How to tell whether a string is a number? Pin
Vasudevan Deepak Kumar7-Feb-03 0:11
Vasudevan Deepak Kumar7-Feb-03 0:11 
GeneralRe: How to tell whether a string is a number? Pin
Richard Deeming7-Feb-03 0:15
mveRichard Deeming7-Feb-03 0:15 
GeneralTabbing MDI childs Pin
thedex5-Feb-03 11:11
thedex5-Feb-03 11:11 
GeneralRe: Tabbing MDI childs Pin
Vasudevan Deepak Kumar6-Feb-03 2:29
Vasudevan Deepak Kumar6-Feb-03 2:29 
QuestionHow to create a control that docks and slides like the toolbox? Pin
thedex5-Feb-03 11:06
thedex5-Feb-03 11:06 
AnswerRe: How to create a control that docks and slides like the toolbox? Pin
Chris Austin5-Feb-03 13:13
Chris Austin5-Feb-03 13:13 
QuestionDateTimePicker Color Change? Pin
Sovman5-Feb-03 10:42
Sovman5-Feb-03 10:42 
AnswerRe: DateTimePicker Color Change? Pin
TigerNinja_6-Feb-03 3:55
TigerNinja_6-Feb-03 3:55 
GeneralBuilding a .NET User Control base Class Pin
Anonymous5-Feb-03 7:46
Anonymous5-Feb-03 7:46 
GeneralRe: Building a .NET User Control base Class Pin
TigerNinja_5-Feb-03 8:28
TigerNinja_5-Feb-03 8:28 
GeneralRe: Building a .NET User Control base Class Pin
leppie5-Feb-03 9:07
leppie5-Feb-03 9:07 
GeneralRe: Building a .NET User Control base Class Pin
FruitBatInShades5-Feb-03 10:43
FruitBatInShades5-Feb-03 10:43 
GeneralDeserialization problem Pin
Roman Shchugarev5-Feb-03 1:43
Roman Shchugarev5-Feb-03 1:43 
GeneralRe: Deserialization problem Pin
marcossl5-Feb-03 7:02
marcossl5-Feb-03 7:02 

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.