ClassWithStaticFields.cs 1.2 KB

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