Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public List<InvItem> invitems; //start of indexer
  2. public InvItem this[int i]
  3. {
  4. get
  5. {
  6. try
  7. {
  8. Validator.IsWithinRange(i);
  9. }
  10. catch (ArgumentOutOfRangeException)
  11. {
  12. throw;
  13. }
  14. return invitems[i];
  15. }
  16. set
  17. {
  18. invItems[i] = value;
  19. }
  20. }
  21. private void FillItemListBox()
  22. {
  23. List<InvItem> items = new List<InvItem>();
  24. lstItems.Items.Clear();
  25. lstItems.DataSource = items;
  26. }
  27.  
  28. For the life of me, I can't figure out where I am going wrong. Thanks for any help!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement