I m just now started learning C#.net. I m getting error "The left-hand side of an assignment must be a variable, property or indexer" what its meaning?
solve C# error
Collapse
X
-
It means you *can* say:
int x = 5;
you can *not* say:
6 = 9;
Think back to your 6th grade algebra.
The right side of an equation is calculated and assigned to the left side.
X = 7 + 6 + 5;
The right side is evaluated: 7 + 6 is 13 + 5 is 18
X = 18;
The value of 18 is assigned to X
The error is telling you that the left side of your equation is not something you can assign to like a variable or a property or an indexer.
Comment