using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Task;`
`namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadLine();
}
}
}
I am just trying to get started off in C#, and as I was writing my helloworld, I met my first compilation error.
ERROR: Script compilation failed. [CompilationErrorException] error CS0234: The type or namespace name 'Task' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)
I am running the latest .NET editing in VScode. Hope for your help.
Are you looking for the Task in System.Threading.Tasks?
Note the 's' at the end.
Full reference is System.Threading.Tasks.Task, or for a using, System.Threading.Tasks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With