C# Assembly Reference
Posted: Sat Jun 04, 2022 11:27 pm
A trivial C# program:
using System;
using System.IO;
public class HelloWorld {
static public void Main () {
Console.WriteLine ("Hello World!");
Streamreader sr = new Streamreader();
}
}
My program, above, results in the following error.
Compilation failed: 1 error(s), 0 warnings
main.cs(7,7): error CS0246: The type or namespace name `Streamreader' could not
be found. Are you missing an assembly reference
How does one add an assembly reference?
using System;
using System.IO;
public class HelloWorld {
static public void Main () {
Console.WriteLine ("Hello World!");
Streamreader sr = new Streamreader();
}
}
My program, above, results in the following error.
Compilation failed: 1 error(s), 0 warnings
main.cs(7,7): error CS0246: The type or namespace name `Streamreader' could not
be found. Are you missing an assembly reference
How does one add an assembly reference?