- Latest Articles
- Top Articles
- Posting/Update Guidelines
- Article Help Forum
- View Unanswered Questions
- View All Questions
- View C# questions
- View C++ questions
- View Javascript questions
- View Visual Basic questions
- View Python questions
- CodeProject.AI Server
- All Message Boards...
- Running a Business
- Sales / Marketing
- Collaboration / Beta Testing
- Work Issues
- Design and Architecture
- Artificial Intelligence
- Internet of Things
- ATL / WTL / STL
- Managed C++/CLI
- Objective-C and Swift
- System Admin
- Hosting and Servers
- Linux Programming
- .NET (Core and Framework)
- Visual Basic
- Web Development
- Site Bugs / Suggestions
- Spam and Abuse Watch
- Competitions
- The Insider Newsletter
- The Daily Build Newsletter
- Newsletter archive
- CodeProject Stuff
- Most Valuable Professionals
- The Lounge
- The CodeProject Blog
- Where I Am: Member Photos
- The Insider News
- The Weird & The Wonderful
- What is 'CodeProject'?
- General FAQ
- Ask a Question
- Bugs and Suggestions
Error CS0131: the left-hand side of an assignment must be a variable, property or indexer. How to fix this?
2 solutions
- Most Recent
Add your solution here
- Read the question carefully.
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
- If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
IMAGES
VIDEO
COMMENTS
In C# (and most if not all other languages) there is something called an LValue and an RValue: when you do an assignment you always have an LValue on the left of the equals sign and an RValue on the right. The LValue is where the value is to be stored, and the RValue is the value to store into it.
Code is returning: "The left-hand side of an assignment must be a variable, property or indexer" I'm still new to C# (coming from python), but I understand this issue, however I've got no clue how to fix it. I essentially want to have input initially equal x round x each cycle and multiply that rounded number by input y:
When you compare something you need to use three equals signs. So if you want to say 8 * 2 is equal to 16 you would show it 8*2===16