Sign in to follow this  

[.net] Checking to see if label textbox contents are Integer

Recommended Posts

Renegadeandy    100
I want to a run a bit of code , only if the current contents of two textboxes are integers. In C i would just try casting the contents to an int, if it fails, then its not an int, but I dont know how to do this in Currently I have this : Private Sub NNumberRequired_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NNumberRequired.TextChanged If NUnitCost.Text Then REM CHECK IF CONTENTS OF TEXTBOX IS AN INT CostOfPurchase.Text = NUnitCost.Text * NNumberRequired.Text End If Please help! Cheers Andy

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this