Hello all i have tried to convert c# code to vb but getting error in this line as "Expression Expected" what can be the error and what is the correct syntax. Error is in second line
Dim m As MenuItem = TryCast(sender, MenuItem)
audioDevice = (If(m.Index>0, filters.AudioInputDevices(m.Index-1), Nothing))
C# CODE
MenuItem m = sender as MenuItem;
audioDevice = ( m.Index>0 ? filters.AudioInputDevices[m.Index-1] : null );
Ifmust beIif?IIf!!Iifthen your choice...