fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7.  
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. Gamer player1 = new Gamer("mefedron");
  13. Console.WriteLine(player1.nick);
  14.  
  15. Console.ReadLine();
  16.  
  17.  
  18. }
  19.  
  20.  
  21. }
  22. class Gamer
  23. {
  24. public Gamer(string nick)
  25. {
  26. this.nick = nick;
  27.  
  28. }
  29.  
  30. string nick;
  31. int id;
  32.  
  33.  
  34.  
  35.  
  36. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(13,39): error CS0122: `Gamer.nick' is inaccessible due to its protection level
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty