Re: CInt in VB.net
From: Marc M (nospam_at_mail.com)
Date: 01/18/05
- Next message: Marc M: "Re: CInt in VB.net"
- Previous message: Aditya: "Preparing for 70305"
- In reply to: anonymous_at_discussions.microsoft.com: "CInt in VB.net"
- Next in thread: Marc M: "Re: CInt in VB.net"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 09:31:15 -0600
CInt will convert to Interger
CDouble will help you.
C???? are leftover of old VB 6, try to get away from it
In .Net it is better to use CType like
if CType(input, double) ....
Good luck
Marc M
MCSD (6.0 & .NET)
anonymous@discussions.microsoft.com wrote:
> Hi,
>
> I have a question regarding the use of CInt and/or Char
> member functions.
>
> Let's say I have an input string,
>
> Dim input As String = "7.5"
>
> and I need to check if this string(number) is either 7 or
> 8 (or so on....), I use the CInt function and compare the
> value using If-statement.
>
> "7.5" is supposed to return false to me but CInt now
> turns it into 8 (so it returns true now)
>
> Any ideas to fix that?
>
> thanks.
- Next message: Marc M: "Re: CInt in VB.net"
- Previous message: Aditya: "Preparing for 70305"
- In reply to: anonymous_at_discussions.microsoft.com: "CInt in VB.net"
- Next in thread: Marc M: "Re: CInt in VB.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|