Checking strings are alphanumeric

  • Thread starter Thread starter Oenone
  • Start date Start date
O

Oenone

Is there a nice .NET framework function that will allow me to easily check
if a string contains only alphanumeric characters?

Or is the only way to loop through the characters, checking each one
individually?

TIA,
 
Oenone said:
Is there a nice .NET framework function that will allow me to easily check
if a string contains only alphanumeric characters?

Or is the only way to loop through the characters, checking each one
individually?


Check out the 'Like' operator and/or
'System.Text.RegularExpressions.IsMatch'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top