fork download
  1. using System;
  2.  
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7.  
  8. namespace ConsoleApplication6
  9. {
  10.  
  11. public class gradutionStudent
  12. {
  13. protected string level;
  14. protected int year;
  15. public product(string level, int year)
  16. {
  17. this.level = level;
  18. this.year = year;
  19. }
  20. public void Print()
  21. {
  22. Console.WriteLine("level: {0}", level);
  23. Console.WriteLine("year :{0}", year);
  24.  
  25. }
  26.  
  27.  
  28.  
  29.  
  30. }
  31. class Program
  32. {
  33. static void Main(string[] arys)
  34. {
  35. gradutionStudent S = new gradutionStudent("level 4","Senior" );
  36. Console.WriteLine("Stydent Information : ");
  37. S.PrintInfo();
  38. }
  39. }
  40. }
  41. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(15,16): error CS1520: Class, struct, or interface method must have a return type
prog.cs(41,0): error CS1525: Unexpected symbol `}'
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty