Guest User

Untitled

a guest
Sep 18th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. Why is this property not showing in the Properties Box?
  2. namespace WpfApplication1
  3. {
  4. /// <summary>
  5. /// Interaction logic for MainWindow.xaml
  6. /// </summary>
  7. public partial class MainWindow : Window
  8. {
  9. public MainWindow()
  10. {
  11. InitializeComponent();
  12.  
  13. contacts.Add(new Contact()
  14. {
  15. Name = "James",
  16. Email = "james@mail.com",
  17. PhoneNumber = "01234 111111"
  18. });
  19. contacts.Add(new Contact()
  20. {
  21. Name = "Bob",
  22. Email = "bob@mail.com",
  23. PhoneNumber = "01234 222222"
  24. });
  25. contacts.Add(new Contact()
  26. {
  27. Name = "Emma",
  28. Email = "emma@mail.com",
  29. PhoneNumber = "01234 333333"
  30. });
  31. }
  32.  
  33. protected List<Contact> contacts = new List<Contact>();
  34.  
  35. public List<Contact> Contacts
  36. {
  37. get { return contacts; }
  38. set { contacts = value; }
  39. }
  40.  
  41. }
  42.  
  43. [Browsable(true)]
  44. public List<Contact> contacts
  45. {
  46. get { return this._contacts; }
  47. set { this._contacts = value; }
  48. }
  49. protected List<Contact> _contacts = new List<Contact>();
Add Comment
Please, Sign In to add comment