For example consider the following code:
Properties.Settings.Default.startUp = cmbStart.SelectedIndex.ToString();
in vb.net the same approach works fine but in c# it's not. Here startUp is user defined setting which is type byte and cmbStart is a ComboBox. What can I do to fix this error?
cmbStart.SelectedIndex.ToString();equal to index value in string. if index is 0 it will return 0 as value in string.Option Strict Onand this conversion will also fail. VB lets you do some dopey things by default.