|
-
Aug 5th, 2002, 03:21 AM
#1
Thread Starter
Junior Member
string to int convertion
Hi
How to convert string to integer.
For eg Myint = Text1.text dint work out.
regards
viswanathan
-
Aug 5th, 2002, 03:50 AM
#2
Hyperactive Member
-
Aug 5th, 2002, 04:03 AM
#3
-
Aug 5th, 2002, 04:14 AM
#4
Hyperactive Member
.Text is default for a Text box so you don't need to use it in code.
-
Aug 5th, 2002, 04:19 AM
#5
Originally posted by GlenW
.Text is default for a Text box so you don't need to use it in code.
Valid point Glen, but I beleive its good practice - it makes
you use the, or at least, makes you think about the .property
you need to use.
-
Aug 5th, 2002, 04:24 AM
#6
Hyperactive Member
Originally posted by Bruce Fox
Valid point Glen, but I beleive its good practice - it makes
you use the, or at least, makes you think about the .property
you need to use.
You're probably right Bruce, guess I'm just lazy.
-
Aug 5th, 2002, 04:29 AM
#7

(you and me both )
-
Aug 5th, 2002, 04:34 AM
#8
Hyperactive Member
Guess our code didn't work or we'd have been thanked.
-
Aug 5th, 2002, 10:06 AM
#9
Hyperactive Member
You might also want to use the Val function in order not to get a 13 Type Mismatch if the text box contains 'string' data instead of a number.
VB Code:
MyInt = Cint(Val(Text1.Text))
Nate
-
Aug 5th, 2002, 10:08 AM
#10
Originally posted by Bruce Fox
Valid point Glen, but I beleive its good practice - it makes
you use the, or at least, makes you think about the .property
you need to use.
one other point on this... MS got rid of the default properties on controls in VB.NET because it was bad practice... just like they got rid of other bad bad things like variants and negative bounds in arrays.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|