fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var c = new Class1();
  8.  
  9. c.Prop1 = 1;
  10. // c.Prop2 = 2; // cannot access
  11. // c.Prop3 = 3; // cannot access
  12. c.Prop4 = 4;
  13. c.Prop5 = 5;
  14.  
  15. // your code goes here
  16. Console.WriteLine("hello, world!");
  17. }
  18. }
  19.  
  20. public class Class1
  21. {
  22. public int Prop1 { get; set; }
  23. protected int Prop2 { get; set; }
  24. private int Prop3 { get; set; }
  25. internal int Prop4 { get; set; }
  26. protected internal int Prop5 { get; set; }
  27.  
  28. void SetProperties(int val1, int val2, int val3, int val4, int val5)
  29. {
  30. Prop1 = val1;
  31. Prop2 = val2;
  32. Prop3 = val3;
  33. Prop4 = val4;
  34. Prop5 = val5;
  35. }
  36. }
Success #stdin #stdout 0.03s 23872KB
stdin
Standard input is empty
stdout
hello, world!