Re: How to check for string as alpha or numeric??
- From: "Bruce Wood" <brucewood@xxxxxxxxxx>
- Date: 20 May 2005 12:15:11 -0700
I would look into the Regex class and regular expressions. You can use
Regex to check the string against any pattern you like, "all digits"
being one possible pattern, which would look like this:
if (Regex.IsMatch(myString, @"^\d+$")) ...
which will match a string containing one or more digits and nothing
else.
.
- References:
- How to check for string as alpha or numeric??
- From: trint
- How to check for string as alpha or numeric??
- Prev by Date: Re: Newsgroup reader
- Next by Date: Visual Studio Tools for the Microsoft Office System
- Previous by thread: How to check for string as alpha or numeric??
- Next by thread: RE: How to check for string as alpha or numeric??
- Index(es):
Relevant Pages
|