1

I'm new on c#. So i created simple cs file including code template. I removed using System line and tried to write my code using fully qualified name like System.Console.WriteLine("Hello World!"); But when i tried to compile it on CMD i got this error message :

Test.cs(4,20): error CS0246: The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?)

code : 

    //using System;
namespace first{
    class Test{
        static void Main(String[] args){
            System.Console.WriteLine("Welcome To C#");
            System.Console.ReadKey();
        }
    }
}
Mahdi
  • 9
  • 2
  • i think youl will find the answer here : https://stackoverflow.com/questions/30543664/how-string-is-available-without-using-system-namespace... so you need to write "System.String[]" – Ctac Sep 04 '22 at 08:33
  • You caire about Console.WriteLine and forget (String[]..) , so you have also add system to String like (System.String[] – saimmm0710 Sep 04 '22 at 08:54

0 Answers0