简体   繁体   中英

Cannot implicitly convert type 'string' to 'System.Windows.Forms.Label'

The code that is causing the problem is

txtResult.Text = Convert.ToString(step3);

and it produces the error

Cannot implicitly convert type 'string' to 'System.Windows.Forms.Label'

See this image:

在此处输入图片说明

Going by the image, it would appear you are not actually having this issue. Intellisense will often leave previous compilation errors hanging around until you attempt another compilation - this is most notable in your image because the blue line indicating en error is off and does not cover the entire line. Always build or rebuild your code before assuming an error is still occurring.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM