How do I import/add packages to C# script file?

1.5k Views Asked by At

Recently I've been practicing C# and learning the fundamentals, and I found it really cool that I can create a script file with dotnet-script. But I haven't seen much support for it online, so I don't know to what extent I can take these script files to test stuff. So I was wondering how I can import System.Drawing.Point to a .csx file and what else I can do with them.

1

There are 1 best solutions below

0
Hardood On

if you want to import a c# namespace you can simply use the normal using keyword.

using System.Data;
using System.IO;

for importing .csx files you can use #load

#load  "./filename.csx";