Click here to Skip to main content
15,892,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: IIF strange behaviour Pin
Dalek Dave19-Jul-10 23:28
professionalDalek Dave19-Jul-10 23:28 
GeneralRe: IIF strange behaviour Pin
ddecoy20-Jul-10 0:10
ddecoy20-Jul-10 0:10 
AnswerRe: IIF strange behaviour Pin
Dave Kreskowiak20-Jul-10 2:04
mveDave Kreskowiak20-Jul-10 2:04 
GeneralRe: IIF strange behaviour Pin
ddecoy20-Jul-10 2:11
ddecoy20-Jul-10 2:11 
AnswerRe: IIF strange behaviour Pin
Luc Pattyn20-Jul-10 2:15
sitebuilderLuc Pattyn20-Jul-10 2:15 
GeneralRe: IIF strange behaviour Pin
Eddy Vluggen20-Jul-10 2:27
professionalEddy Vluggen20-Jul-10 2:27 
AnswerRe: IIF strange behaviour Pin
ddecoy20-Jul-10 3:14
ddecoy20-Jul-10 3:14 
GeneralRe: IIF strange behaviour Pin
Dave Kreskowiak20-Jul-10 3:41
mveDave Kreskowiak20-Jul-10 3:41 
Yep. IIF is a function that returns a single type, just like any other.

The reason why VB.NET let's you get away with some of this stuff at compile time is because, by default, VB will try to provide implicit conversions to what it thinks the expected types should be where as C# will not.

Like Luc said, the way to avoid this is Option Strict On.

A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




AnswerRe: IIF strange behaviour Pin
Dave Doknjas20-Jul-10 12:00
Dave Doknjas20-Jul-10 12:00 
AnswerThe problem is with the CType, not the IIf Pin
Gregory Gadow22-Jul-10 3:55
Gregory Gadow22-Jul-10 3:55 
Questionhow to make treenode style changed when mouse over it ? Pin
sanyexian19-Jul-10 14:47
sanyexian19-Jul-10 14:47 
AnswerRe: how to make treenode style changed when mouse over it ? Pin
Abhinav S19-Jul-10 18:34
Abhinav S19-Jul-10 18:34 
GeneralRe: how to make treenode style changed when mouse over it ? Pin
sanyexian19-Jul-10 19:51
sanyexian19-Jul-10 19:51 
Questionadding tab control in VB6 Pin
Sakhalean19-Jul-10 3:09
Sakhalean19-Jul-10 3:09 
AnswerRe: adding tab control in VB6 Pin
E.F. Nijboer19-Jul-10 4:47
E.F. Nijboer19-Jul-10 4:47 
GeneralRe: adding tab control in VB6 Pin
Sakhalean19-Jul-10 18:55
Sakhalean19-Jul-10 18:55 
AnswerRe: adding tab control in VB6 Pin
Neville Nazerane20-Jul-10 1:48
Neville Nazerane20-Jul-10 1:48 
GeneralRe: adding tab control in VB6 Pin
E.F. Nijboer20-Jul-10 6:00
E.F. Nijboer20-Jul-10 6:00 
AnswerRe: adding tab control in VB6 Pin
Goutam Patra19-Jul-10 22:42
professionalGoutam Patra19-Jul-10 22:42 
AnswerRe: adding tab control in VB6 Pin
MikeD 227-Jul-10 3:38
MikeD 227-Jul-10 3:38 
QuestionHow to pass in class to web service? Pin
Steve van Niman18-Jul-10 5:06
Steve van Niman18-Jul-10 5:06 
AnswerRe: How to pass in class to web service? Pin
nlarson1118-Jul-10 6:13
nlarson1118-Jul-10 6:13 
GeneralRe: How to pass in class to web service? Pin
Steve van Niman18-Jul-10 6:16
Steve van Niman18-Jul-10 6:16 
GeneralRe: How to pass in class to web service? Pin
nlarson1118-Jul-10 6:42
nlarson1118-Jul-10 6:42 
GeneralRe: How to pass in class to web service? Pin
Steve van Niman18-Jul-10 7:01
Steve van Niman18-Jul-10 7:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.