The error you recieve is not about lists, but about scopes. So the answer to
surely lists have been in use for a while?
is a definitive "yes". Lists (or at least arrays) exists since the very beginnings of C#, while generics followed in C# 2.0 which was supported from VS2005 onwards (for more information about the C# language-history see https://learn.microsoft.com/dotnet/csharp/whats-new/csharp-version-history).
Your problem however is that you have a statement outside a class. However classes are the very fundamental concept behind OOP - everything relates to classes. The following - which has nothing to do with lists - would also be invalid:
using System;
using System.Collections.Generic;
int i = 3;
As mentioned before everything in .NET relates to classes - there´s no such conceptional thing as "global". So you have to move your statement into a class:
using System;
using System.Collections.Generic;
class MyClass
{
List<string> stringList = new List<string>();
}
This will scope your list to a specific instance of MyClass. You can further limit the scope of a variable to a method or even a specific scope within a method. For further information about scopes read this.
After all the error-message you recieve relates to a new feature that is under discussion for C#9:
Allow a sequence of statements to occur right before the
namespace_member_declarations of a compilation_unit (i.e. source
file).