Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Everyone!

What is this message : # IDE059 which appears frequently ?In a C# winform application error list, The message "IDE059 Unnecessary assignment value to 'result' shows up. But it is not troubling me while compiling or running the a program. How to solve this issue.

What I have tried:

I have not tried anything as it is a new issue for me.
Posted
Updated 14-Nov-22 12:49pm
v2

If you don't understand an error (or in this case a rule flag) message, google it: IDE059 Unnecessary assignment value to 'result' - Google Search[^]
This leads to MS: IDE0059: Remove unnecessary value assignment - .NET | Microsoft Learn[^] which explains why you get the code improvement message, and what you can do about it.
 
Share this answer
 
You can use IntelliSense 'Quick Actions':

Suppress or Configure issues -> Configure IDE059 Severity -> None
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900