Could Some one Please help with two lines trans from C#?
-
Hi, Is it some one out there who could please help me transelate this C# code to VB.NET? int vPos=(index <= selectedBand) ? buttonHeight*index : buttonHeight*index+selectedBandHeight; int height=selectedBand==index ? selectedBandHeight+buttonHeight : buttonHeight; Thanks, Richard
-
Hi, Is it some one out there who could please help me transelate this C# code to VB.NET? int vPos=(index <= selectedBand) ? buttonHeight*index : buttonHeight*index+selectedBandHeight; int height=selectedBand==index ? selectedBandHeight+buttonHeight : buttonHeight; Thanks, Richard
I believe that C# syntax can be accomplished with the IIf VB function. Dim vPos as Integer = CInt(IIf(index <= selectedBand, buttonHeight * index, buttonHeight * index + selectedBandHeight)) Dim height as Integer = CInt(IIf(selectedBand = index, selectedBandHeight + buttonHeight, buttonHeight)) This code is off the top of my head and hasn't been tested, so be warned. ;)
-
I believe that C# syntax can be accomplished with the IIf VB function. Dim vPos as Integer = CInt(IIf(index <= selectedBand, buttonHeight * index, buttonHeight * index + selectedBandHeight)) Dim height as Integer = CInt(IIf(selectedBand = index, selectedBandHeight + buttonHeight, buttonHeight)) This code is off the top of my head and hasn't been tested, so be warned. ;)