Using the dotnet-cli (dotnet new, dotnet restore) with VScode, I made a new C# program.
However, I can't seem to use the StreamReader properly. Here's the code.
using System;
using System.IO;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
StreamReader test = new StreamReader("Test.txt");
}
}
}
I can't seem to run this program. When I run using dotnet run, it says that
'string' cannot be converted to 'System.IO.Stream' [netcoreapp1.0]
I tried creating the same program in Visual Studio Community and it runs fine with out any errrors