How to fix the problem (eliminate the red lines)?

8238 views c#

I copied some code to my code editor from the page However I don't know how to fix it. Could anybody help?

My code

answered question

When you hover over them what does IntelliSense say. Usually that gives you a good indication as to what the problem is.

Looks like the classes Coffe, Egg, Toast and Juice have not been defined yet.

The problem is that you copied code you don't understand. I'd suggest you to leave the async tutorial for now and go to this one instead:…. In fact, I'd leave the async tutorial for the end.

1 Answer


You can create classes for Bacon, Toast, Egg, Coffee, Juice. You can remove the static keyword from the created classes.

posted this

Have an answer?


Please login first before posting an answer.