ClassWithStaticFields.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. namespace Jint.Tests.Runtime.Domain;
  2. public class ClassWithStaticFields
  3. {
  4. public static string Get = "Get";
  5. public static string Set = "Set";
  6. public static string Getter { get { return "Getter"; } }
  7. public static string Setter { get; set; }
  8. public static readonly string Readonly = "Readonly";
  9. static ClassWithStaticFields()
  10. {
  11. Setter = "Setter";
  12. }
  13. }
  14. public class Nested
  15. {
  16. public class ClassWithStaticFields
  17. {
  18. public static string Get = "Get";
  19. public static string Set = "Set";
  20. public static string Getter
  21. {
  22. get { return "Getter"; }
  23. }
  24. public static string Setter
  25. {
  26. get
  27. {
  28. return _setter;
  29. }
  30. set
  31. {
  32. _setter = value;
  33. }
  34. }
  35. public static readonly string Readonly = "Readonly";
  36. private static string _setter;
  37. static ClassWithStaticFields()
  38. {
  39. Setter = "Setter";
  40. }
  41. }
  42. }