The
using
statement creates a "shortcut" which allows you to use a class without specifying it's full name. YOu don't have to use them, but ...
using System;
using System.IO;
using System.Collections.Generic;
public class Program
{
static void Main(string[] args)
{
List<string> myList = new List<string>();
...
Console.ReadLine();
}
}
Is a lot more readable than:
using System;
using System.IO;
public class Program
{
static void Main(string[] args)
{
System.Collections.Generic.List<string> myList = new System.Collections.Generic.List<string>();
...
Console.ReadLine();
}
}
But in order to use a class from an assembly (and apart from the very basic value types
everything is in an assembly of some form) it has to be added to the project by adding a reference to that assembly to the project:
Manage references in a project - Visual Studio (Windows) | Microsoft Docs[
^]