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

8238 views c#
8

I copied some code to my code editor from the page https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/. 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: docs.microsoft.com/en-us/dotnet/csharp/programming-guide/…. In fact, I'd leave the async tutorial for the end.

1 Answer

7

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?

JD

Please login first before posting an answer.

Ads

Categories