0

How do I reference mscorlib for C# in cloud9?

The sample code for hello world doesn't work

using System;

public class Hello2
{
   public static void Main()
   {
      Console.WriteLine("Hello, World!");
   }
}

because it emits the following errors:

error: expected nested-name-specifier before ‘System’ using System;
error: ‘System’ has not been declared
error: expected unqualified-id before ‘public’
public class Hello2

zx485
  • 28,498
  • 28
  • 50
  • 59
user1500
  • 1
  • 2

1 Answers1

0

you are missing namespace

using System;
namespace namespace_name
{
   public class Hello2
   {
       public static void Main()
       {
             Console.WriteLine("Hello, World!");
        }
    }
}
Shachaf.Gortler
  • 5,655
  • 14
  • 43
  • 71
  • error: expected nested-name-specifier before ‘System’ using System; error: ‘System’ has not been declared error: expected ‘{’ before ‘public’ public class Hello2 error: expected unqualified-id before ‘public’ error: expected ‘}’ at end of input – user1500 Nov 09 '16 at 22:19