Beginner Question: Using Standard C# classes like List<> or Dictionary<,>

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ABC_Freak

I set up Godot with C# with the intention of using all the excessive Framework already provided by C#.

So my Project is starting and running with C# skripts.

Now if i want to use a C# List i get an compiler error saying List<> was not found.

So my guess is that the C# stuff is not included by the compiler.

How do i get access to those?

I am using Visual Studio Code for editing and VS2019 as a compiler.

:bust_in_silhouette: Reply From: spaceyjase

Likely just missing the the appropriate using clause. Everything C# is included.

using System.Collections.Generic;

(that is also assuming the code is correct; e.g. List<> isn’t valid as it is missing a type).

Consider using VS2019 as the editor as it provides appropriate hints while editing. You may also consider adding appropriate C# extensions to Visual Studio Code to provide the same hints and compilation; but pick one and use it consistently to avoid confusion.