checking data type inside textboxes

Fatalkaiser

New member
Joined
Aug 17, 2007
Messages
2
Programming Experience
Beginner
How do i check if the text in a textbox contains integers/string/boolean etc values?
is it something along the lines of this?

VB.NET:
Textbox1.text.Contains.String
 
You can use the Char class.

Char.IsLetter - for letters
Char.IsNumber or Char.IsNumber - for Numbers

Hope this will help you.

Let me know if you still have questions.

Jah Bless!!! :D


Drop Seeds and not your Bombs, Show your Love and not your Arms.
 
How do i check if the text in a textbox contains integers/string/boolean etc values?
is it something along the lines of this?

VB.NET:
Textbox1.text.Contains.String

The text contianed within a textbox is always of type string.

If you want a boolean, use a Checkbox. If you want a number, use a NumericUpDown
 
Back
Top