fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. private static class Hello {
  6. public int a;
  7. }
  8. public static void editHello(Hello h) {
  9. h.a = 12;
  10. }
  11. public static void Main()
  12. {
  13. Hello h = new Hello();
  14. editHello(h);
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,40): error CS0721: `Test.Hello': static types cannot be used as parameters
prog.cs(8,24): error CS0051: Inconsistent accessibility: parameter type `Test.Hello' is less accessible than method `Test.editHello(Test.Hello)'
prog.cs(5,26): (Location of the symbol related to previous error)
prog.cs(6,20): error CS0708: `Test.Hello.a': cannot declare instance members in a static class
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty