472,145 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Numeric Validation in c#.net

ramprabu
Hello,

I was get some data from a database. I wants to check the data is number or string. How can I solve this problem in c#.net?

Regards

Ram Prabu
Feb 8 '07 #1
2 4590
shweta123
692 Expert 512MB
Hi,

Use isNumeric to determine wheather its a number.If it returns False data is string as string can contain anything including numbers.

Shweta
Feb 8 '07 #2
nmsreddi
366 256MB
Hello

you can use a logic here just find the Ascii values characters and use a if

else condition ,thats all you can easily differentiate the numerics and

characters ,i was using the same logic but for some different purpose ,i

validated while inserting into the database.

Hope may help you..
Feb 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

30 posts views Thread by Dr John Stockton | last post: by
16 posts views Thread by Keith | last post: by
16 posts views Thread by tshad | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.