fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var count = typeof(ABC).GetFields().Length;
  8. Console.WriteLine(count);
  9. }
  10. }
  11.  
  12. static class ABC
  13. {
  14. private static string name = string.Empty;
  15. // private List<string> slist = new List<string>();
  16. public static int A;
  17. public static int B;
  18. public static int C;
  19. public static string huh;
  20. }
Success #stdin #stdout 0.03s 26340KB
stdin
Standard input is empty
stdout
4