I'm using this code to "convert" the status of a Radio Button to a integer in "boolean way"
If MyRadioButton.Checked Then
cmdConnection.Parameters.AddWithValue("@paramMychoice", 1)
Else
cmdConnection.Parameters.AddWithValue("@paramMychoice", 0)
End If
The code works fine
Reading the answer of Muhammad Nabeel Arif in this link Store boolean value in SQLite
he uses
int flag = (boolValue)? 1 : 0;
But if I try something like
Dim flag As Integer
flag = (MyRadioButton.Checked)? 1 : 0
I get "option strict on disallows implicit conversions from 'boolean' to 'integer'"
Right, I understand and Visual Studio suggest something like flag = CInt((ProtocoloAutorizadaNoRadioButton.Checked))? 1 : 0
But I also get the error "The ? character cannot be used here"
How can I use the solution of int flag = (boolValue)? 1 : 0 on VB.net?