The left-hand side of an assignment must be a variable, property or indexer
Assignment in conditional expression is always constant; did you mean to use == instead
The error mostly pops when a VB programmer codes in C#.
To fix this error, make sure that all operators are on the right-hand side and that the left-hand side is a variable, property, or indexer. Use == for checking values instead of ‘=’
if (String.IsNullOrEmpty(s1) == true)
instead of
if (String.IsNullOrEmpty(s1) = true)
Thxxx yaarrr
ReplyDeletesame pr plz help
ReplyDeleteError 2 The left-hand side of an assignment must be a variable, property or indexer
conatinate two list box item
my code
lboxhr.SelectedItem.Text + " '" + LBoxmin.SelectedItem.Text + " ' " + LBoxdy.SelectedItem = dr["strInstime"].ToString();
@Bajaj. Are you trying to store the selected item to a textbox or string
ReplyDeleteIF that is the case please try
Dim sText as string = lboxhr.SelectedItem.Text + " '" + LBoxmin.SelectedItem.Text + " ' " + LBoxdy.SelectedItem
If it is not clear can you please explain a bit