Class6.cs 788 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Library6Properties
  7. {
  8. internal class Class6
  9. {
  10. static int num = 1;
  11. static public int NumGet
  12. {
  13. get
  14. {
  15. int print = num;
  16. num = num + 2;
  17. return print;
  18. }
  19. }
  20. static public int Num
  21. {
  22. set
  23. {
  24. int count = 1;
  25. for (int i = 1; count <= value; i = i + 2, count++)
  26. {
  27. if (count == value)
  28. {
  29. num = i;
  30. break;
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }