Advertisement
Splinti

stackoverflowexception

Jan 8th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net.Sockets;
  7. using System.Net;
  8. using System.Windows.Input;
  9.  
  10. namespace TestApp1
  11. {
  12. class MenuEntrys
  13. {
  14. public int id { get; set; }
  15. public string name;
  16. public string Name
  17. {
  18. get { return name; }
  19. set { name = value; }
  20. }
  21. public MenuEntrys()
  22. {
  23. this.id = identificator;
  24. this.name = "Entry " + this.id;
  25. this.selected = false;
  26. identificator++;
  27. numOfEntries++;
  28. }
  29. public MenuEntrys(string name)
  30. {
  31. this.id = identificator;
  32. this.name = name;
  33. this.selected = false;
  34. identificator++;
  35. numOfEntries++;
  36. }
  37.  
  38. static int numOfEntries = 0;
  39. static int identificator = 0;
  40.  
  41. public static int getCount()
  42. {
  43. return numOfEntries;
  44. }
  45.  
  46. public bool selected
  47. {
  48. get { return selected; }
  49. set { selected = value; }
  50. }
  51.  
  52. public void select()
  53. {
  54. this.selected = !this.selected;
  55. }
  56. public int getId()
  57. {
  58. return this.id;
  59. }
  60. }
  61. class Program
  62. {
  63. static void mainMenu()
  64. {
  65. MenuEntrys start = new MenuEntrys("StartGame");
  66. }
  67. static void Main(string[] args)
  68. {
  69. mainMenu();
  70. }
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement